Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Event Level Sumo-Pot (https://forums.graalonline.com/forums/showthread.php?t=61299)

kunikunze 09-19-2005 10:05 AM

Event Level Sumo-Pot
 
1 Attachment(s)
I designed a new Event Level for Classic.
Can someone help me with the script?

Its a similar level to snowpot on Unholy Nation.
The player is not allowed to touch the water while he tries to
get the other player with pots into it!

How to express the following thing:

If (playertoucheswater)

{setlevel XXX}

The eventlevel is in the attachement!
-.Thank You.-

napo_p2p 09-19-2005 06:00 PM

It's against the rules to give full scripts, so I'll give you some hints...
I'll assume you'll be using GS1.

Use a clientside timeout loop to check if the player is swimming. Can use:
PHP Code:

if (strequals(#m,swim)) 

or:
PHP Code:

if (swimming

If they are swimming, an easy way to change their spot is to simply change playerx and playery to a location on the level that is not part of the arena. If you want them warped to a different level, you will have to use triggeraction, since setlevel2 is a serverside command.

ForgottenLegacy 09-20-2005 02:35 AM

Quote:

Originally Posted by napo_p2p
It's against the rules to give full scripts, so I'll give you some hints...
I'll assume you'll be using GS1.

Use a clientside timeout loop to check if the player is swimming. Can use:
PHP Code:

if (strequals(#m,swim)) 

or:
PHP Code:

if (swimming

If they are swimming, an easy way to change their spot is to simply change playerx and playery to a location on the level that is not part of the arena. If you want them warped to a different level, you will have to use triggeraction, since setlevel2 is a serverside command.

Well, in GS2 you could do
PHP Code:

if (player.ani == "aniname, 'swim' or 'dead' for instance") {
  
// place your triggeraction to serverside here, then check the gani again serverside and warp out the player serverside :D


Have that in a timeout loop, called every .1 or .05 seconds, and that _should_ work.

kunikunze 09-27-2005 04:06 PM

erm ok, but .... how to set a timeout loop?
i found a flag called "playerswim" but it seems not to work
I tried

PHP Code:

if (playerswim)
{
setlevel2 .....} 

i am no admin i cant test it serverside. :frown:

the "strequals" flag u mentioned doesnt work too.

Torankusu_2002 09-27-2005 06:25 PM

triggeractions work offline.

It's better to check for the ani, but you will have to find the gani classic uses for swim because I think most of them are differently named. Look in levels/ganis anything with classic_ is a gani for classic playerworld.

But,


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

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