diff options
author | Jesusaves <cpntb1@ymail.com> | 2023-12-07 15:55:30 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2023-12-07 15:55:30 -0300 |
commit | 0b23910ba921703b7d2013f876c072f600f8b0c6 (patch) | |
tree | 15dae037b1f8205d6cae46e5df9658393e317a58 | |
parent | e51ff8eb6af4d3b00070fb1cfc5503715ef6c9f2 (diff) | |
download | serverdata-0b23910ba921703b7d2013f876c072f600f8b0c6.tar.gz serverdata-0b23910ba921703b7d2013f876c072f600f8b0c6.tar.bz2 serverdata-0b23910ba921703b7d2013f876c072f600f8b0c6.tar.xz serverdata-0b23910ba921703b7d2013f876c072f600f8b0c6.zip |
Harden Barzil's code
-rw-r--r-- | npc/007-1/pylon.txt | 2 | ||||
-rw-r--r-- | npc/009-3/barzil.txt | 4 | ||||
-rw-r--r-- | npc/craft/smith.txt | 7 |
3 files changed, 10 insertions, 3 deletions
diff --git a/npc/007-1/pylon.txt b/npc/007-1/pylon.txt index 20f8023a4..71637600a 100644 --- a/npc/007-1/pylon.txt +++ b/npc/007-1/pylon.txt @@ -38,7 +38,7 @@ L_Menu: rif(countitem(Topaz) >= 1 && Zeny >= 100, l("Yeah sure, take my Topaz!")), rif(countitem(Amethyst) >= 1 && Zeny >= 100, l("Yeah sure, take my Amethyst!")), rif(countitem(IronOre) >= 1 && Zeny >= 100, l("And what about Iron Ore?")), - rif(countitem(SunnyCrystal) >= 1 && Zeny >= 1000, l("And what about Sunny Crystals?")), + rif(countitem(SunnyCrystal) >= 1 && Zeny >= 1000 && !checkbound(SunnyCrystal), l("And what about Sunny Crystals?")), l("No, thanks, I will keep my gems."); mes ""; diff --git a/npc/009-3/barzil.txt b/npc/009-3/barzil.txt index 2c6c77689..2f3216d0d 100644 --- a/npc/009-3/barzil.txt +++ b/npc/009-3/barzil.txt @@ -18,8 +18,8 @@ L_Tier2: mesq l("Of course! Quick, take it!!"); inventoryplace SunnyCrystal, 1; ST_TIER=3; - // getitembound SunnyCrystal, 1, 4; - getitem SunnyCrystal, 1; + getitembound SunnyCrystal, 1, 4; + //getitem SunnyCrystal, 1; close; OnInit: diff --git a/npc/craft/smith.txt b/npc/craft/smith.txt index 9b8387c91..ae7872527 100644 --- a/npc/craft/smith.txt +++ b/npc/craft/smith.txt @@ -27,6 +27,13 @@ function script SmithSystem { copyarray(.knowledge,RECIPES_EQUIPMENT,getarraysize(RECIPES_EQUIPMENT)); .success=false; + // Hack check + if (checkbound(SunnyCrystal)) { + mesc l("The %s in your backpack reacts violently. You should first dispose of it before attempting to craft anything.", getitemlink(SunnyCrystal)), 1; + return false; + } + + // Main craft loop mesc l("WARNING: Strange bugs may happen if you attempt to craft an item you already have on inventory!"), 1; setskin "craft4"; .@var$ = requestcraft(4); |