Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-18-2003, 12:16 AM
SilentSkripter1988 SilentSkripter1988 is offline
Banned
Join Date: Aug 2003
Posts: 56
SilentSkripter1988 is on a distinguished road
Help w/ Lotto Ticket

Ok my problem is that whenever I change the lotto numbers by random or by Change Numbers it changes everyone lotto numbers, I cant think of any way to fix it. I know its doing it because all the tickets read out of this.lottoa, b, and c. But I dont know any other way to do it.

// NPC made by Silent Skripter *Scripting*
if (created) {
this.lottoa = 0;
this.lottob = 0;
this.lottoc = 0;
}
if (playerchats && strequals(#c, Random Lotto Numbers)){
this.lottoa = int(random(0, 10));
this.lottob = int(random(0, 10));
this.lottoc = int(random(0, 10));
setcharprop #c, Current lotto tickets numbers: #v(this.lottoa), #v(this.lottob), #v(this.lottoc);
}
if (playerchats && strcontains(#c, Change Numbers)){
tokenize #c;
this.lottoa = strtofloat(#t(2));
this.lottob = strtofloat(#t(3));
this.lottoc = strtofloat(#t(4));
setcharprop #c, Current lotto tickets numbers: #v(this.lottoa), #v(this.lottob), #v(this.lottoc);
}
if (playerchats && strequals(#c, take ticket)) {
toweapons Lotto Ticket;
setplayerprop #c, Took 1 Lotto Ticket;
}

if (weaponfired) {
setplayerprop #c,Your numbers are #v(this.lottoa), #v(this.lottob), #v(this.lottoc);
}
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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:59 AM.


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