Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   A little help with a scrip t please? :3 (https://forums.graalonline.com/forums/showthread.php?t=134263800)

Gunderak 07-09-2011 03:42 AM

A little help with a scrip t please? :3
 
basically iv got a warning script in a weapon and it doesnt work.. for what reason i dont know. could someone who is far more advanced at scripting please take a look at it?

Thanks
-Gunderak


//#CLIENTSIDE
function onPlayerChats() {
if (!player.chat.starts("/warn")) return; // If it doesn't start with '/warn' do nothing

temp.pl = findplayer(player.chat.substring(6)); // Find the player that needs a warning

if (temp.pl == null) { // If the player isn't found
player.chat = "Couldnt Find " @ player.chat.substring(6) @ "";
}
else {
temp.pl.setlevel2("warning_room.nw", 10, 10);
temp.pl.say2("You've been warned!!!");
}
}

cbk1994 07-09-2011 04:01 AM

Since it's clientside you need to use triggers. Read the posts linked in this section of Jer's scripting guide which I pointed you to when you posted this question earlier.

Gunderak 07-09-2011 04:12 AM

iv read that but am still unsure of how to use a triggerserver command to do this task X_X

cbk1994 07-09-2011 04:52 AM

This thread (posted five days ago, with a descriptive title, and still on the first page of the scripting forum) has the information you need.

If you're still having trouble with this I would suggest you find a scripter for your server as you've not convinced me that you're actually interested in learning based on the posts you've made today.


All times are GMT +2. The time now is 09:40 PM.

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