Autor Topic: Necesito reprogramar Unstuck Character [PHP]  (Visto 40 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline ivanchonqn on: April 15, 2019, 01:12:08 PM

  • *
  • Rank: Principiante
  • Posts: 8
  • Gracias recibida: 1
  • ar
Buenas, estoy buscando la manera de hacer lo siguiente:

Si la clase del usuario es = 33 (elf)
Lo destrabe y lo deje en noria, no en lorencia.
Intenté pero no me lo destraba a noria:

dejo lo que hice:

Code: [Select]
<?
/**
* @+===========================================================================+
* @¦ MUCore v1.0.8 Premium                                                     ¦
* @¦ Credits: Isumeru & MaryJo & Dao Van Trong - Trong.CF                      ¦
* @+===========================================================================+
*/
$config = simplexml_load_file('engine/config_mods/unstuck_character_settings.xml');
$active = trim($config->active);
if ($active == '0') {
    echo msg('0', text_sorry_feature_disabled);
} else {
    $mapnumber = trim($config->map_number);
    $map_pos_y = trim($config->map_pos_y);
    $map_pos_x = trim($config->map_pos_x);
   
    $mapnumber_1 = trim($config->map_number_1);
    $map_pos_y_1 = trim($config->map_pos_y_1);
    $map_pos_x_1 = trim($config->map_pos_x_1);
    if (isset($_GET['uid'])) {
       
        $id = safe_input($_GET['uid'], '');
        if (empty($id) || !is_numeric($id)) {
            header('Location: ' . $core_run_script . '');
            exit();
        } else {
            if (character_and_account($id, $user_auth_id) === false) {
                header('Location: ' . $core_run_script . '');
                exit();
            } else {
                if (account_online($user_auth_id) === true) {
                    echo msg('0', text_ustuckcharacter_t1);
                } else {
                     $characters = $core_db->Execute("Select class from character where AccountID='$user_auth_id'");
                    if ($characters->fields[0] == 33){
               
                $unstuck = $core_db->Execute("Update character set [mapnumber]=?,[mapposx]=?,[mapposy]=? where mu_id=?", array(
                        $mapnumber_1,
                        $map_pos_x_1,
                        $map_pos_y_1,
                        $id
                    ));
                    if ($unstuck) {
                        echo msg('1', text_ustuckcharacter_t2);
                    } else {
                        echo msg('0', text_ustuckcharacter_t3);
                    }
               
                }
                   
                   
                  else  {$unstuck2 = $core_db->Execute("Update character set [mapnumber]=?,[mapposx]=?,[mapposy]=? where mu_id=?", array(
                        $mapnumber,
                        $map_pos_x,
                        $map_pos_y,
                        $id
                    ));
                    if ($unstuck2) {
                        echo msg('1', text_ustuckcharacter_t2);
                    } else {
                        echo msg('0', text_ustuckcharacter_t3);
                    }
                        }
                }
            }
        }
    }
   
    $t4 = str_replace("{map}", decode_map($mapnumber), text_ustuckcharacter_t4);
    $t4 = str_replace("{coord_x}", $map_pos_x, $t4);
    $t4 = str_replace("{coord_y}", $map_pos_y, $t4);
   

   
}

?>

Este es el xml

Citar
<?xml version="1.0" encoding="iso-8859-1"?>
<unstuck_character_settings>
<active>1</active>
<map_number>0</map_number>
<map_pos_y>135</map_pos_y>
<map_pos_x>142</map_pos_x>

<map_number_1>0</map_number_1>
<map_pos_y_1>165</map_pos_y_1>
<map_pos_x_1>142</map_pos_x_1>
</unstuck_character_settings>

Offline ivanchonqn #1 on: April 17, 2019, 02:06:40 PM

  • *
  • Rank: Principiante
  • Posts: 8
  • Gracias recibida: 1
  • ar

Offline GX_KYO #2 on: April 17, 2019, 02:26:52 PM

  • *
  • Rank: Liga mayor
  • Posts: 184
  • Gracias recibida: 243
  • pe
Hmmmm aqui:

Code: [Select]
<map_number>0</map_number>
<map_number_1>0</map_number_1>

Cambiaste esos 0 por 3 y no funciono??
Killing me one breath at a time... Cutting you with my pair of lives... So go on and lay me down to rest, You make it painless, painless!
I can't... I can't... I can't...
I can't feel ANY PAIN!

Offline ivanchonqn #3 on: April 17, 2019, 02:28:52 PM

  • *
  • Rank: Principiante
  • Posts: 8
  • Gracias recibida: 1
  • ar
Hmmmm aqui:

Code: [Select]
<map_number>0</map_number>
<map_number_1>0</map_number_1>

Cambiaste esos 0 por 3 y no funciono??

Le cambíe las coordenadas, ya que si andaría el codigo me llevaría a la cordenada que agregúe, no a la cordenada por default!

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
178 Views
Last post April 22, 2018, 06:55:19 PM
by trucoder22
0 Replies
141 Views
Last post June 08, 2018, 01:31:24 AM
by cerbero08
2 Replies
894 Views
Last post September 22, 2018, 10:51:41 PM
by rescate02
2 Replies
105 Views
Last post December 05, 2018, 03:16:41 PM
by oskar
5 Replies
1120 Views
Last post March 13, 2019, 07:52:15 PM
by -RASTAA👽