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-01-2004, 05:31 AM
Gman4pwnu Gman4pwnu is offline
Banned
Join Date: Jan 2004
Posts: 434
Gman4pwnu is on a distinguished road
Send a message via AIM to Gman4pwnu
Summon Script in a level npc stupid problem

I was making a level summon script, it works, but it summon the player to 0 x and 0 y in the level =\
help.

NPC Code:

if (actionplayertouch){
with (getplayer(#p(0))){
setcharprop #c,#p(0);
this.xx=strtofloat(#p(1));
this.yy=strtofloat(#p(2));
setplayerprop #c,Being Summoned;
setlevel2 #p(3),this.xx,this.yy;
}
}

//#CLIENTSIDE

if (playerchats&&strcontains(#c,/summon)){
tokenize #c;
setplayerprop #c,#v(playerx),#v(playery),#L;
triggeraction x+.5,y+.5,playertouch,#t(1),playerx,playery,#L;
}

Reply With Quote
  #2  
Old 03-01-2004, 05:36 AM
Blue_Dragn Blue_Dragn is offline
Registered User
Join Date: Jul 2003
Posts: 302
Blue_Dragn is on a distinguished road
Re: Summon Script in a level npc stupid problem

Quote:
Originally posted by Gman4pwnu
I was making a level summon script, it works, but it summon the player to 0 x and 0 y in the level =\
help.

NPC Code:

if (actionplayertouch){
with (getplayer(#p(0))){
setcharprop #c,#p(0);
this.xx=strtofloat(#p(1));
this.yy=strtofloat(#p(2));
setplayerprop #c,Being Summoned;
setlevel2 #p(3),this.xx,this.yy;
}
}

//#CLIENTSIDE

if (playerchats&&strcontains(#c,/summon)){
tokenize #c;
setplayerprop #c,#v(playerx),#v(playery),#L;
triggeraction x+.5,y+.5,playertouch,#t(1),playerx,playery,#L;
}

if im thinking right playerx and playery are already defined and dont need strtofloat?

else try just defining strtofloat and the params in the setlevel, rather then setting another variable.

Tired right now, hope it helps
__________________
No longer a Advertisement Goat
Reply With Quote
  #3  
Old 03-01-2004, 05:41 AM
Gman4pwnu Gman4pwnu is offline
Banned
Join Date: Jan 2004
Posts: 434
Gman4pwnu is on a distinguished road
Send a message via AIM to Gman4pwnu
Fixed. Had to define playerx and playery as variables in the triggeraction.
Reply With Quote
  #4  
Old 03-01-2004, 09:42 AM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
Quote:
Originally posted by Gman4pwnu
Fixed. Had to define playerx and playery as variables in the triggeraction.
Well duh, how in hell did you get to know all this so fast?
It's odd:o
__________________
V$:CONFL16T
Reply With Quote
  #5  
Old 03-01-2004, 06:31 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally posted by WanDaMan

Well duh, how in hell did you get to know all this so fast?
It's odd:o
It's obvious. '
Reply With Quote
  #6  
Old 03-01-2004, 07:37 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
Quote:
Originally posted by osrs


It's obvious. '
That's the word.
__________________
V$:CONFL16T
Reply With Quote
  #7  
Old 03-01-2004, 11:11 PM
Gman4pwnu Gman4pwnu is offline
Banned
Join Date: Jan 2004
Posts: 434
Gman4pwnu is on a distinguished road
Send a message via AIM to Gman4pwnu
I learned? Ive worked for a lot of servers since my last huge question thread. Im a quick learner i have big time experience in C++.

Once you know how to use the syntax you just use commands.rtf for things you dont know.
Reply With Quote
  #8  
Old 03-02-2004, 03:10 AM
DarkShadows_Legend DarkShadows_Legend is offline
Cult of the Winky
DarkShadows_Legend's Avatar
Join Date: Apr 2003
Location: Florida
Posts: 614
DarkShadows_Legend is on a distinguished road
Send a message via AIM to DarkShadows_Legend
Well that helps. It's good that you are learning.
Though, I suggest using the search feature instead of making so many threads about every problem you have.
There's a lot of nice and helpful topics around that can help some of the problems you encounter.
__________________
- Criminal X

"I rather be hated for being myself, than be liked for being what you like best. I go above the influence, not under." - Me
Reply With Quote
  #9  
Old 03-02-2004, 03:13 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by Gman4pwnu
I learned? Ive worked for a lot of servers since my last huge question thread. Im a quick learner i have big time experience in C++.

Once you know how to use the syntax you just use commands.rtf for things you dont know.
...? Somehow I doubt you know a lot of C/++, the advanced stuff in the language requires you to edit memory and other things, and debugging takes a lot of problem solving skills, you've basically been demonstrating close to 0 skills in that area.
Reply With Quote
  #10  
Old 03-02-2004, 03:16 AM
marcoR marcoR is offline
Registered User
Join Date: Jul 2003
Posts: 1,349
marcoR is on a distinguished road
Load the cannons! *therump!* ready, aim, fire! *BANG BANG BANG* Ahh.. another one shotdown by Jagen..
__________________
If this is your account, contact me.
- loriel
email, jabber: [email protected]
icq: 67530805
aim: lorielvictrix
Reply With Quote
  #11  
Old 03-02-2004, 10:17 AM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
Smeh get on topic, I'ma IM u gmanpwn since I need 'c ++' help.
I'll tell you if he can help..
__________________
V$:CONFL16T
Reply With Quote
  #12  
Old 03-02-2004, 03:42 PM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
this.xx and this.yy??

if (actionplayerwarp) {
with(getplayer(#p(0))) {
setlevel2 #F,30,30;
}
}
//#CLIENTSIDE
if (playerchats&&startswith(/summon,#c)) {
tokenize #c;
triggeraction x+.5,y+.5,playerwarp,#t(1);
}

yey for not giving triggeraction hackers a break
Reply With Quote
  #13  
Old 03-02-2004, 06:58 PM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Quote:
Originally posted by R0bin
this.xx and this.yy??

if (actionplayerwarp) {
with(getplayer(#p(0))) {
setlevel2 #F,30,30;
}
}
//#CLIENTSIDE
if (playerchats&&startswith(/summon,#c)) {
tokenize #c;
triggeraction x+.5,y+.5,playerwarp,#t(1);
}

yey for not giving triggeraction hackers a break
this.xx & this.yy were to make the player summon to the summoner's position.
Reply With Quote
  #14  
Old 03-02-2004, 07:34 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
On N-pulse there script is neat!!
Check it out

//#CLIENTSIDE
if(playertouchsme){
triggeraction 0,0,#a,levelname.nw,30,30;
}

I love it :O
Fun fun
__________________
V$:CONFL16T
Reply With Quote
  #15  
Old 03-03-2004, 06:00 PM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
Quote:
Originally posted by Riot


this.xx & this.yy were to make the player summon to the summoner's position.
Yeah, whats wrong with this.x and this.y? why the doubleness?
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 08:49 AM.


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