Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Summon - Gmap Problems (https://forums.graalonline.com/forums/showthread.php?t=51544)

projectigi 03-07-2004 11:16 AM

Summon - Gmap Problems
 
Hi,

I've made a summon script. It works but not on the Gmap.
So i tried to make it work like

NPC Code:

this.x=onmapx(#L)*64+playerx;
this.y=onmapy(#L)*64+playery;
triggeraction 0,0,serverside,-System,warp,#a,#L,#v(this.x),#v(this.y);


but that dont work :(
The Player who i summon will be warped on gmap but he will not warped to me.

plz Help

Riot 03-07-2004 11:48 AM

Re: Summon - Gmap Problems
 
Quote:

Originally posted by projectigi
Hi,

I've made a summon script. It works but not on the Gmap.
So i tried to make it work like

NPC Code:

this.x=onmapx(#L)*64+playerx;
this.y=onmapy(#L)*64+playery;
triggeraction 0,0,serverside,-System,warp,#a,#L,#v(this.x),#v(this.y);


but that dont work :(
The Player who i summon will be warped on gmap but he will not warped to me.

plz Help

Ugh, just check for the player's x and y serverside before doing getplayer.

projectigi 03-07-2004 12:12 PM

you mean?
NPC Code:

if(actionserverside){
with(getplayer(#p(0))){
this.x=playerx;
this.y=playery;
setstring this.lvl,#L;
}
with(getplayer(#p(1))){
setlevel2 #s(this.lvl),#v(this.x),#v(this.y);
}
}
//#CLIENTSIDE
if(playerchats&&startswith(/summon,#c)){
tokenize #c;
triggeraction 0,0,serverside,-Summon,#a,#t(1);
}


?

Riot 03-07-2004 12:22 PM

The getplayer(#p(0)) part is uneeded as it is the local player anyway.

Gman4pwnu 03-26-2004 06:16 AM

What I did for this was I checked if the player was on a gmap level as all gmap levels on our server start with at_city-a-j1-11.nw.
so i checked for strcontains #L at_city- and if it was it summoned to the gmap level or else it summoned to the regular level. You may need to add more checks if you have more than 1 gmap.


All times are GMT +2. The time now is 11:07 AM.

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