View Single Post
  #19  
Old 04-24-2003, 04:51 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Re: I need some help with this...

Quote:
Originally posted by GoZelda
I'm having some problems with the following script, i don't see what's wrong, please help me...

// NPC made by Cyrin
setimg beer.png

if (playertouchsme){
// wont' work online, but fine for offline
toweapons Dagger;
}

if (weaponfired) {
if (strequals(#s(client.equipment),fists)){
setstring client.equipment,dagger;
setplayerprop #c,Equipped Dagger;
setstring client.weaponpower,2;
}
if (strequals(#s(client.equipment),dagger)){
setstring client.equipment,fists;
setplayerprop #c,Unequipped Dagger;
setstring client.weaponpower,1;
}
}


If the script worked it would always be set client.equipment=fists

becouse you change it to dagger then the next if statement checks if it's dagger and changes it back to fists.

You might try an elseif statement.

To busy arguing to catch that guys?
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote