Skip to content

CharacterCP functions

zze edited this page Sep 23, 2012 · 1 revision

How to create a function for the characterCP

  1. Log into the ACP of IP.board. navigate to Look & Feel > Manage Skin Sets & Templates > Manage Templates in IP.Board
  2. On the left side look for ‘skin_syncApp’ click the title to expand the different sections. After hit GameCP.

You will be displayed with an html editor form this is the output portion of the character control panel.

  1. Within gameCP search for:
<select name='function' id='function'>
<option value="1">Revive</option>
<option value="2">Unstuck</option>
</select>

Add your options here..

example:

<select name='function' id='function'>
<option value="1">Revive</option>
<option value="2">Unstuck</option>
<option value="3">Example</option>
</select>

Now the fun part! open [*IP_Board*]/admin/applications_addon/other/syncApp/extensions/ usercpform.php

Search for

$cmdLineToSend = array();
$soap_passed = array();
$cmdLineToSend[] = 'revive '.$characters[$this->request['character_guid']]['name'];
$cmdLineToSend[] = 'tele name '.$characters[$this->request['character_guid']]['name'].' $home';
$soap_command = $this->ExecuteSoapCommand($cmdLineToSend);
foreach($cmdLineToSend as $cmd)
{
    $soap_command = $this->ExecuteSoapCommand($cmd);
    if($soap_command['sent'])
        $soap_passed[$cmd] = 'passed';
    else
        $soap_passed[$cmd] = 'failed';
}
break;

after break;

add:

case:3
YourAmazingCode(_);
break;

Clone this wiki locally