Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 06-25-2011, 08:52 PM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
Quote:
Originally Posted by Deas_Voice View Post
to clarify what Crow and Thor means; hasWeapon is GS1 and does not exist in GS2.

however, you shouldn't have to loop thought the player's weapons to find if you have a weapon or not. findWeapon() should do the trick.

findWeapon(str weaponname) - returns str (object?)
if you have the weapon, or 0 if you don't have it.
with this, you could make a hasWeapon(weap) function by checking if findWeapon() is equal to 0, if that is so, return false, if not, return true. this works on both client and serverside.

e; no pre-scripted for you , should be simple enuf with my "description"
Ah, I'll have to remember that! Also I had no idea that the function was completely absent in GS2. I'm thinking /scripthelp hasweapon should be updated to at least tell the user that it's not functional online.
__________________
MY POSTS ARE PRONE TO EDITS!
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:57 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.