View Single Post
  #6  
Old 08-24-2005, 11:56 PM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
Quote:
Originally Posted by Luigi203
What the hell, Hachi? Use a DB NPC, did you absorb nothing I tried to teach you? I guess you like opening your server. flags and wondering what the hell each flag means.



NPC Code:

setstring 'serverr.strings',#v(strtofloat(#s('serverr.strings')) - 250);




Use the flag prefix thiso. and with(). Thiso. flags belong to the npc that is 'calling' another with the with() function, for example,
NPC Code:

thiso.var = 5;
with (getnpc(DBNPC)) this.var += thiso.var;



If you were to just do "with (getnpc(DBNPC)) this.var += this.var;"
it would add DBNPC's this.var to itself, however, since thiso.var belongs to the current npc and it equals 5, it adds 5 to DBNPC's this.var. I hope you understand this...
I never really learned about DBs. :[
Reply With Quote