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 12-06-2001, 01:00 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
ok...

NPC Code:

// assume the player says "you are a carrot, *flinch*"
if (playerchats) {
tokenize #c;
/*
this cuts up the line "you are a carrot, *flinch*" into a new string at every space and comma. so it is:
#t(0) = you
#t(1) = are
#t(2) = a
#t(3) = carrot
#t(4) = *flinch*
meaning no only does it break at every space and comma it also cuts them.
*/

// Now strequals()
if (strequals(Owner,#a)&&strequals(#a,Owner)) {
/*
since it is making sure the two strings equal each other the two strings are interchangible.
*/
if (strequals(#t(0),you)&&strequals(#t(1),are)&&streq uals(#t(2),a)&&strequals(#t(3),carrot)) {
showimg 201,@Yesh i am,20,120;
changeimgvis 201,4;
}
}
}



hope this helped, e-mail me: [email protected] if u have ne further questions.
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
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 07:23 AM.


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