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 03-04-2003, 03:55 PM
TheStivi TheStivi is offline
Registered User
Join Date: Sep 2002
Location: Germany - NRW
Posts: 78
TheStivi is on a distinguished road
Send a message via ICQ to TheStivi Send a message via AIM to TheStivi
Help in a Script ^^ (Putnpc2)

This the part of the new Trophy Sys for G2k2 and for Doomsday maybe not for g2k2 but for doomsday , h3h3

Why it dont works ? All works without the dropping of the npc -_-"


There is no image or the npc is not dropped -_-"

Plz help me :

if (strequals(#t(this.test),1) && keydown2(keycode(w),true)){
setani lay,;
setstring server.pos,#v(this.select);
setstring server.name,#s(client.trophies1);
setstring server.rank,#s(client.rank);
putnpc2 playerx+0.5+vecx(playerdir)*2,playery-0.1+vecy(playerdir)*2,{
if (created || playerenters){
setstring this.pos,#s(server.pos);
setstring this.name,#s(server.name);
setstring this.rank,#s(server.rank);
setimg #s(this.rank)#s(this.name)trophy.png;
}
if (playertouchsme){
tokenize #s(client.trophie);
setstring client.trophie;
for (this.i=0;this.i
if (this.i=strtofloat(#s(this.pos))){
setstring client.trophie,#s(client.trophie) 1;
}
else {
setstring client.trophie,#s(client.trophie) #t(this.i);
}
}
destroy;
};

setstring client.trophie,;
for (this.i=0;this.i<60;this.i++){
if (this.i=this.test){
setstring client.trophie,#s(client.trophie) 0;
}
else{
setstring client.trophie,#s(client.trophie) #t(this.i);
}
}
}
Reply With Quote
  #2  
Old 03-04-2003, 03:58 PM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
Format it first or I, for one, will not look at it
__________________
new account: Trevor
Reply With Quote
  #3  
Old 03-04-2003, 04:01 PM
Christian Christian is offline
Senior Member
Join Date: Oct 2002
Posts: 270
Christian is on a distinguished road
Using server. flags is evil..
Reply With Quote
  #4  
Old 03-04-2003, 04:03 PM
TheStivi TheStivi is offline
Registered User
Join Date: Sep 2002
Location: Germany - NRW
Posts: 78
TheStivi is on a distinguished road
Send a message via ICQ to TheStivi Send a message via AIM to TheStivi
I hope its formatted good enough -_- :
NPC Code:

if (strequals(#t(this.test),1) && keydown2(keycode(w),true))
{
setani lay,;
setstring server.pos,#v(this.select);
setstring server.name,#s(client.trophies1);
setstring server.rank,#s(client.rank);
putnpc2 playerx+0.5+vecx(playerdir)*2,
playery-0.1+vecy(playerdir)*2,
{
if (created || playerenters){
setstring this.pos,#s(server.pos);
setstring this.name,#s(server.name);
setstring this.rank,#s(server.rank);
setimg #s(this.rank)#s(this.name)trophy.png;
}
if (playertouchsme){
tokenize #s(client.trophie);
setstring client.trophie;
for (this.i=0;this.i<100;this.i++){
if (this.i=strtofloat(#s(this.pos))){
setstring client.trophie,#s(client.trophie) 1;
}
else {
setstring client.trophie,#s(client.trophie) #t(this.i);
}
}
destroy;
};

setstring client.trophie,;
for (this.i=0;this.i<60;this.i++){
if (this.i=this.test){
setstring client.trophie,#s(client.trophie) 0;
}
else{
setstring client.trophie,#s(client.trophie) #t(this.i);
}
}
}


Last edited by TheStivi; 03-04-2003 at 04:16 PM..
Reply With Quote
  #5  
Old 03-04-2003, 10:47 PM
Falados Falados is offline
Cucumber NPC
Falados's Avatar
Join Date: Jan 2003
Posts: 141
Falados is on a distinguished road
Send a message via ICQ to Falados Send a message via AIM to Falados
Forgot a } after destroy;
(otherwords, forgot to end the if() statement.)
__________________

subliminal message: 1+1=3
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 12:24 AM.


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