Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   kicking? (https://forums.graalonline.com/forums/showthread.php?t=77517)

Knightmare1 11-11-2007 12:32 AM

kicking?
 
ive tried a bunch of times, and failed, but is there even a way to CLICK on a player to kick them? like if im saying, ":kick" and click?

Twinny 11-11-2007 01:12 AM

Yes

PHP Code:

function onMouseDown(mode)
{
  if (
player.chat == ":kick")
  {
    if (
mode == "left")
    {
      for (
pl players)
      {
        if (
mousex in |pl.xpl.x+1.5|)
        {
          if (
mousey in |pl.ypl.y+2|)
          {
            
triggerserver("gui"this.name"kickthatfool"pl.account);
            break;
          }
        }
      }
    }
  }


Change the 1.5 and 2 to whatever range you want to have.

Rapidwolve24 11-11-2007 01:12 AM

It has to be scripted.

PHP Code:

function onPlayerChats()
{
  if (
player.chat.starts(":kick"))
  {
    
temp.kickplayer findPlayer(player.chat.substring(5).trim());
    
    if (
temp.kickplayer.level == player.level)
    {
      
temp.kickplayer.setlevel2(levelxy);
    }
  }


For ":kick account"

Twinny 11-11-2007 01:33 AM

Quote:

Originally Posted by Rapidwolve24 (Post 1357675)

For ":kick account"

Quote:

Originally Posted by Knightmare1 (Post 1357671)
even a way to CLICK on a player to kick them?

:rolleyes:

Knightmare1 11-11-2007 05:27 AM

would this work?

PHP Code:

function onActionServerSide() {
  if (
params[0] == "StaffTag1") {
    
setLevel2("utopiaow_e4.nw"35.526);
}


//#CLIENTSIDE
function onMouseDown(mode)
{
  if (
player.chat == ":kick")
  {
    if (
mode == "left")
    {
      for (
pl players)
      {
        if (
mousex in |pl.xpl.x+1.5|)
        {
          if (
mousey in |pl.ypl.y+2|)
          {
            
triggerserver("gui"this.name"kicked"pl.account);
            break;
          }
        }
      }
    }
  }



napo_p2p 11-11-2007 05:32 AM

Quote:

Originally Posted by Knightmare1 (Post 1357713)
would this work?

Close, just that you would need to change the actionserverside...
PHP Code:

function onActionServerSide() {
  if (
params[0] == "kicked") {
    
findplayer(params[1]).setlevel2("utopiaow_e4.nw"35.526);
  }



Knightmare1 11-11-2007 10:43 PM

ty i used the params for my stafftag


All times are GMT +2. The time now is 10:06 AM.

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