Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-16-2009, 11:56 PM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
is player.equip(float) the same as setstring clientr.equipped_id,#v(float); ?

Yeah, I don't get MUD functions at all, and asking the wiki just gives me a bunch of old advertisements for Kingdoms. (THANKS! -_-)

Basically, that system NPC I inherited does
PHP Code:
if (clientr.equipped_id != NULLunequipItem(temp.pl);
  
  
temp.item temp.pl.getItem(temp.id);
  
  if (
temp.item[3] == "ammo") {
    return;
  }
  
  
temp.pl.equip(temp.id);
  
  
temp.pl.triggerclient("gui"this.name"equip"); 
Then seems to expect the equip command to cause

PHP Code:
clientr.equipped[3] == "gun"
setshootparams(clientr.equipped[5]); 
etc; it's easy enough to
PHP Code:
    temp.tyid=clientr.equipped_id 0;
    
temp.tokens clientr.(@"item_"@tyid).tokenize(); 
instead, but I don't understand player.equip(float) enough to trust a workaround - should I just be saying, right after player.equip, to tokenize and assign
PHP Code:
clientr.equipped[5]=temp.tokens[5
? (or even tidier),perhaps
PHP Code:
clientr.equipped=clientr.(@"item_"@tyid).tokenize(); 
?)
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
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 12:36 AM.


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