Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-18-2001, 09:52 PM
Silver Knight Silver Knight is offline
The Ice Cream Social
Silver Knight's Avatar
Join Date: Jun 2001
Location: SoCal
Posts: 541
Silver Knight is on a distinguished road
Send a message via AIM to Silver Knight
Question Another Question

I am making a way to get money on my server (not mining, not fishing, not diving, not bird catching) and I was unsure about part of the script. The part I was having trouble with was checking how many items you had collected.

if (playersays(Check not saying name so idea isnt stolen)) {setplayerprop #c,You have #s(#v(name)) itemname!;}
__________________
Reply With Quote
  #2  
Old 07-18-2001, 09:53 PM
Shard_IceFire Shard_IceFire is offline
Registered User
Shard_IceFire's Avatar
Join Date: Jun 2001
Location: Eastern Harkoonia
Posts: 861
Shard_IceFire is on a distinguished road
Try this:
NPC Code:

if (playerchats&&strequals(#c,Check not saying name so idea isnt stolen)) {
setplayerprop #c,You have #s(#v(name)) itemname!;
}

__________________

-=Shard IceFire=-
Reply With Quote
  #3  
Old 07-18-2001, 10:12 PM
Silver Knight Silver Knight is offline
The Ice Cream Social
Silver Knight's Avatar
Join Date: Jun 2001
Location: SoCal
Posts: 541
Silver Knight is on a distinguished road
Send a message via AIM to Silver Knight
I was thinking of doing that, but I can't really test it because it won't work offline
__________________
Reply With Quote
  #4  
Old 07-18-2001, 10:53 PM
Brady2 Brady2 is offline
Registered User
Brady2's Avatar
Join Date: Mar 2001
Location: Phoenix, AZ and Wichita Falls, TX
Posts: 924
Brady2 is on a distinguished road
Jadis:

-sigh-
NPC Code:

if (playerchats&&strequals(#c,hi)) setplayerprop #c,You have #s(name) items you !@#$#@;

Reply With Quote
  #5  
Old 07-18-2001, 11:15 PM
konidias konidias is offline
Old Bee
konidias's Avatar
Join Date: Jul 2001
Location: Orlando, FL
Posts: 7,222
konidias will become famous soon enough
Send a message via AIM to konidias
NPC Code:

if (playerchats && strequals(#c,item count)) {
setplayerprop #c,You have #s(client.itemcount) itemname(s)!;
}



There you go..

Jadis, you left out the {} plus mine is neater =D
__________________

Put this image in your sig if you support Bomy Island! (g2k1 revision)
play bomberman while you wait!



Last edited by konidias; 07-18-2001 at 11:18 PM..
Reply With Quote
  #6  
Old 07-19-2001, 12:14 AM
Silver Knight Silver Knight is offline
The Ice Cream Social
Silver Knight's Avatar
Join Date: Jun 2001
Location: SoCal
Posts: 541
Silver Knight is on a distinguished road
Send a message via AIM to Silver Knight
isn't client.whatever a npc server string?
__________________
Reply With Quote
  #7  
Old 07-19-2001, 12:44 AM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
lol

Quote:
Originally posted by konidias
NPC Code:

if (playerchats && strequals(#c,item count)) {
setplayerprop #c,You have #s(client.itemcount) itemname(s)!;
}



There you go..

Jadis, you left out the {} plus mine is neater =D
you dont need {} if you only dealing with one thing like

if(playerchats&&strequals(#c,test))
say2 test;

see you wouldn't need them because you only have 1 thing in there but if you do more then 1 thing then you have to use the {}

like

if(playerchats&&strequals(#c,test)){
say2 test;
message test;
}
__________________
Thanks,
-KJL
Reply With Quote
  #8  
Old 07-19-2001, 01:17 AM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
LOL
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #9  
Old 07-19-2001, 02:48 AM
konidias konidias is offline
Old Bee
konidias's Avatar
Join Date: Jul 2001
Location: Orlando, FL
Posts: 7,222
konidias will become famous soon enough
Send a message via AIM to konidias
It's always nice to have them though.. and "client.itemcount" means its a clientside variable.. its not serverside.. its a value stored on the clients side =)
__________________

Put this image in your sig if you support Bomy Island! (g2k1 revision)
play bomberman while you wait!


Reply With Quote
Reply


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 10:25 PM.


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