Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Summon Script in a level npc stupid problem (https://forums.graalonline.com/forums/showthread.php?t=51442)

Gman4pwnu 03-01-2004 05:31 AM

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;
}


Blue_Dragn 03-01-2004 05:36 AM

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

Gman4pwnu 03-01-2004 05:41 AM

Fixed. Had to define playerx and playery as variables in the triggeraction.

WanDaMan 03-01-2004 09:42 AM

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

osrs 03-01-2004 06:31 PM

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. x_x'

WanDaMan 03-01-2004 07:37 PM

Quote:

Originally posted by osrs


It's obvious. x_x'

That's the word.

Gman4pwnu 03-01-2004 11:11 PM

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.

DarkShadows_Legend 03-02-2004 03:10 AM

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.

Python523 03-02-2004 03:13 AM

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.

marcoR 03-02-2004 03:16 AM

Load the cannons! *therump!* ready, aim, fire! *BANG BANG BANG* Ahh.. another one shotdown by Jagen..

WanDaMan 03-02-2004 10:17 AM

Smeh get on topic, I'ma IM u gmanpwn since I need 'c ++' help. ;)
I'll tell you if he can help.. ;)

R0bin 03-02-2004 03:42 PM

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 :)

Riot 03-02-2004 06:58 PM

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.:p

WanDaMan 03-02-2004 07:34 PM

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

R0bin 03-03-2004 06:00 PM

Quote:

Originally posted by Riot


this.xx & this.yy were to make the player summon to the summoner's position.:p

Yeah, whats wrong with this.x and this.y? why the doubleness?


All times are GMT +2. The time now is 06:28 PM.

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