Comando /transfer

Estado
Cerrado para nuevas respuestas.

Ladder

Noicoder FANS!
Colaborador
Hola, queria pedir si alguien me podria correguir este codigo.
Gracias!

[vb]<div class="vb" id="{CB}" style="font-family: monospace;"><ol><li style="" class="li1"> </li><li style="" class="li1"> <span style="color: #b1b100;">If</span> <span style="color: #b1b100;">UCase</span>$<span style="color: #66cc66;">(</span><span style="color: #b1b100;">Left</span>$<span style="color: #66cc66;">(</span>rdata, <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> = <span style="color: #ffffff;">"/TRANSFER "</span> <span style="color: #b1b100;">Then</span></li><li style="" class="li2">    rdata = <span style="color: #b1b100;">Right</span>$<span style="color: #66cc66;">(</span>rdata, <span style="color: #b1b100;">Len</span><span style="color: #66cc66;">(</span>rdata<span style="color: #66cc66;">)</span> - <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">)</span></li><li style="" class="li1">    <span style="color: #b1b100;">If</span> <span style="color: #b1b100;">Len</span><span style="color: #66cc66;">(</span>rdata<span style="color: #66cc66;">)</span> < <span style="color: #cc66cc;">3</span> <span style="color: #b1b100;">Then</span></li><li style="" class="li1">            <span style="color: #b1b100;">Call</span> SendData<span style="color: #66cc66;">(</span>ToIndex, UserIndex, <span style="color: #cc66cc;">0</span>, <span style="color: #ffffff;">"||El usuario es inexistente o no esta conectado."</span> & FONTTYPE_INFO<span style="color: #66cc66;">)</span></li><li style="" class="li2">    <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="" class="li1">    <span style="color: #b1b100;">exit</span> <span style="color: #b1b100;">sub</span></li><li style="" class="li1"> </li><li style="" class="li2">    </li><li style="" class="li1">    tIndex = NameIndex<span style="color: #66cc66;">(</span>ReadField<span style="color: #66cc66;">(</span><span style="color: #cc66cc;">1</span>, rdata, <span style="color: #b1b100;">Asc</span><span style="color: #66cc66;">(</span><span style="color: #ffffff;">" "</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li><li style="" class="li1">    rdata = ReadField<span style="color: #66cc66;">(</span><span style="color: #cc66cc;">2</span>, rdata, <span style="color: #b1b100;">Asc</span><span style="color: #66cc66;">(</span><span style="color: #ffffff;">" "</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li><li style="" class="li2">    <span style="color: #b1b100;">If</span> EsNewbie<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span> <span style="color: #b1b100;">Then</span></li><li style="" class="li1">    <span style="color: #b1b100;">Call</span> SendData<span style="color: #66cc66;">(</span>ToIndex, UserIndex, <span style="color: #cc66cc;">0</span>, <span style="color: #ffffff;">"||Lo sentimos, los newbies no pueden transferirse oro."</span> & FONTTYPE_INFO<span style="color: #66cc66;">)</span></li><li style="" class="li1">    <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li><li style="" class="li2">    <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="" class="li1">    </li><li style="" class="li1">    <span style="color: #b1b100;">If</span> tIndex < <span style="color: #cc66cc;">1</span> <span style="color: #b1b100;">Then</span></li><li style="" class="li2">        <span style="color: #b1b100;">Call</span> SendData<span style="color: #66cc66;">(</span>ToIndex, UserIndex, <span style="color: #cc66cc;">0</span>, <span style="color: #ffffff;">"||El usuario es inexistente o no esta conectado."</span> & FONTTYPE_INFO<span style="color: #66cc66;">)</span></li><li style="" class="li1">    <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="" class="li1"> </li><li style="" class="li2">    </li><li style="" class="li1">    <span style="color: #b1b100;">If</span> rdata < <span style="color: #cc66cc;">1</span> <span style="color: #b1b100;">Then</span> <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li><li style="" class="li1">    </li><li style="" class="li2">    <span style="color: #b1b100;">If</span> rdata > UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Stats</span>.<span style="color: #66cc66;">GLD</span> <span style="color: #b1b100;">Then</span> <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li><li style="" class="li1">    </li><li style="" class="li1">    <span style="color: #b1b100;">Call</span> SendData<span style="color: #66cc66;">(</span>ToIndex, UserIndex, <span style="color: #cc66cc;">0</span>, <span style="color: #ffffff;">"||Le has entregado "</span> & rdata & <span style="color: #ffffff;">" de oro a "</span> & UserList<span style="color: #66cc66;">(</span>tIndex<span style="color: #66cc66;">)</span>.<span style="color: #b1b100;">Name</span> & <span style="color: #ffffff;">"."</span> & FONTTYPE_VENENO<span style="color: #66cc66;">)</span></li><li style="" class="li2">    <span style="color: #b1b100;">Call</span> SendData<span style="color: #66cc66;">(</span>ToIndex, tIndex, <span style="color: #cc66cc;">0</span>, <span style="color: #ffffff;">"||"</span> & UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #b1b100;">Name</span> & <span style="color: #ffffff;">" te dio "</span> & rdata & <span style="color: #ffffff;">" de oro."</span> & FONTTYPE_VENENO<span style="color: #66cc66;">)</span></li><li style="" class="li1">    UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Stats</span>.<span style="color: #66cc66;">GLD</span> = UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Stats</span>.<span style="color: #66cc66;">GLD</span> - rdata</li><li style="" class="li1">    UserList<span style="color: #66cc66;">(</span>tIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Stats</span>.<span style="color: #66cc66;">GLD</span> = UserList<span style="color: #66cc66;">(</span>tIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Stats</span>.<span style="color: #66cc66;">GLD</span> + rdata</li><li style="" class="li2">    SendUserStatsBox <span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span></li><li style="" class="li1">    SendUserStatsBox <span style="color: #66cc66;">(</span>tIndex<span style="color: #66cc66;">)</span></li><li style="" class="li1">    </li><li style="" class="li2">    <span style="color: #b1b100;">If</span> UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">flags</span>.<span style="color: #66cc66;">Privilegios</span> > <span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">Then</span></li><li style="" class="li1">    <span style="color: #b1b100;">Call</span> LogGM<span style="color: #66cc66;">(</span>UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #b1b100;">Name</span>, <span style="color: #ffffff;">"/Transferir "</span> & UserList<span style="color: #66cc66;">(</span>tIndex<span style="color: #66cc66;">)</span>.<span style="color: #b1b100;">Name</span> & <span style="color: #ffffff;">" "</span> & rdata, <span style="color: #66cc66;">(</span>UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">flags</span>.<span style="color: #66cc66;">Privilegios</span> = <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li><li style="" class="li1">    <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="" class="li2">    <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="" class="li1">    <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li><li style="" class="li1"> </li></ol></div>[/vb]


Gracias desde ya ;)
 

CHOTS

Director LapsusAO
Este lo hizo Shura

[vb]<div class="vb" id="{CB}" style="font-family: monospace;"><ol><li style="" class="li1">elect <span style="color: #b1b100;">Case</span> <span style="color: #b1b100;">UCase</span>$<span style="color: #66cc66;">(</span><span style="color: #b1b100;">Left</span>$<span style="color: #66cc66;">(</span>rdata, <span style="color: #cc66cc;">11</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li><li style="" class="li1">        <span style="color: #b1b100;">Case</span> <span style="color: #ffffff;">"/DARORO "</span> <span style="color: #808080;">'DAR ORO</span></li><li style="" class="li2">            <span style="color: #808080;">'¿Esta el user muerto? Si es asi no puede comerciar</span></li><li style="" class="li1">            <span style="color: #b1b100;">If</span> UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">flags</span>.<span style="color: #66cc66;">Muerto</span> = <span style="color: #cc66cc;">1</span> <span style="color: #b1b100;">Then</span></li><li style="" class="li1">                      <span style="color: #b1b100;">Call</span> SendData<span style="color: #66cc66;">(</span>ToIndex, UserIndex, <span style="color: #cc66cc;">0</span>, <span style="color: #ffffff;">"||¡¡Estas muerto!!"</span> & FONTTYPE_INFO<span style="color: #66cc66;">)</span></li><li style="" class="li2">                      <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li><li style="" class="li1">            <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="" class="li1">            <span style="color: #808080;">'Se asegura que el target es un Usuario</span></li><li style="" class="li2">            <span style="color: #b1b100;">If</span> UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">flags</span>.<span style="color: #66cc66;">TargetUser</span> = <span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">Then</span></li><li style="" class="li1">                  <span style="color: #b1b100;">Call</span> SendData<span style="color: #66cc66;">(</span>ToIndex, UserIndex, <span style="color: #cc66cc;">0</span>, <span style="color: #ffffff;">"||Primero tenes que seleccionar un personaje, hace click izquierdo sobre el."</span> & FONTTYPE_INFO<span style="color: #66cc66;">)</span></li><li style="" class="li1">                  <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li><li style="" class="li2">            <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="" class="li1">            rdata = <span style="color: #b1b100;">Right</span>$<span style="color: #66cc66;">(</span>rdata, <span style="color: #b1b100;">Len</span><span style="color: #66cc66;">(</span>rdata<span style="color: #66cc66;">)</span> - <span style="color: #cc66cc;">11</span><span style="color: #66cc66;">)</span></li><li style="" class="li1">            <span style="color: #b1b100;">If</span> UserList<span style="color: #66cc66;">(</span>UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">flags</span>.<span style="color: #66cc66;">TargetUser</span><span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">flags</span>.<span style="color: #66cc66;">Muerto</span> = <span style="color: #cc66cc;">1</span> <span style="color: #b1b100;">Then</span></li><li style="" class="li2"><span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li><li style="" class="li1">            <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="" class="li1">            <span style="color: #b1b100;">If</span> <span style="color: #b1b100;">CLng</span><span style="color: #66cc66;">(</span><span style="color: #b1b100;">val</span><span style="color: #66cc66;">(</span>rdata<span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> > <span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">And</span> <span style="color: #b1b100;">CLng</span><span style="color: #66cc66;">(</span><span style="color: #b1b100;">val</span><span style="color: #66cc66;">(</span>rdata<span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> <= UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Stats</span>.<span style="color: #66cc66;">GLD</span> <span style="color: #b1b100;">Then</span></li><li style="" class="li2">                  UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Stats</span>.<span style="color: #66cc66;">GLD</span> = UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Stats</span>.<span style="color: #66cc66;">GLD</span> - <span style="color: #b1b100;">val</span><span style="color: #66cc66;">(</span>rdata<span style="color: #66cc66;">)</span></li><li style="" class="li1">                  UserList<span style="color: #66cc66;">(</span>UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">flags</span>.<span style="color: #66cc66;">TargetUser</span><span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Stats</span>.<span style="color: #66cc66;">GLD</span> = UserList<span style="color: #66cc66;">(</span>UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">flags</span>.<span style="color: #66cc66;">TargetUser</span><span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Stats</span>.<span style="color: #66cc66;">GLD</span> + <span style="color: #b1b100;">val</span><span style="color: #66cc66;">(</span>rdata<span style="color: #66cc66;">)</span></li><li style="" class="li1">            <span style="color: #b1b100;">Else</span></li><li style="" class="li2">                  <span style="color: #b1b100;">Call</span> SendData<span style="color: #66cc66;">(</span>ToIndex, UserIndex, <span style="color: #cc66cc;">0</span>, <span style="color: #ffffff;">"||"</span> & <span style="color: #b1b100;">vbWhite</span> & <span style="color: #ffffff;">"°"</span> & <span style="color: #ffffff;">" No tenes esa cantidad."</span> & <span style="color: #ffffff;">"°"</span> & Userlist<span style="color: #66cc66;">(</span>UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">flags</span>.<span style="color: #66cc66;">TargetUser</span><span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Char</span>.<span style="color: #66cc66;">charindex</span> & FONTTYPE_INFO<span style="color: #66cc66;">)</span></li><li style="" class="li1">            <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="" class="li1">            <span style="color: #b1b100;">Call</span> SendUserStatsBox<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span></li><li style="" class="li2">            <span style="color: #b1b100;">Call</span> SendUserStatsBox<span style="color: #66cc66;">(</span>UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">flags</span>.<span style="color: #66cc66;">TargetUser</span><span style="color: #66cc66;">)</span></li><li style="" class="li1">            <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li><li style="" class="li1">            <span style="color: #b1b100;">End</span> Select</li></ol></div>[/vb]
 

NicoNZ

Destructor Lvl 6
1º, te recomiendo q lo pongas en el handledata 2

en este select case

[vb]<div class="vb" id="{CB}" style="font-family: monospace;"><ol><li style="" class="li1">Select <span style="color: #b1b100;">Case</span> <span style="color: #b1b100;">UCase</span>$<span style="color: #66cc66;">(</span><span style="color: #b1b100;">Left</span>$<span style="color: #66cc66;">(</span>rdata, <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li></ol></div>[/vb]

[vb]<div class="vb" id="{CB}" style="font-family: monospace;"><ol><li style="" class="li1">    <span style="color: #b1b100;">Case</span> <span style="color: #ffffff;">"/TRANSFER "</span></li><li style="" class="li1">        rdata = <span style="color: #b1b100;">Right</span>$<span style="color: #66cc66;">(</span>rdata, <span style="color: #b1b100;">Len</span><span style="color: #66cc66;">(</span>rdata<span style="color: #66cc66;">)</span> - <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">)</span></li><li style="" class="li2">        <span style="color: #b1b100;">If</span> <span style="color: #b1b100;">Len</span><span style="color: #66cc66;">(</span>rdata<span style="color: #66cc66;">)</span> < <span style="color: #cc66cc;">3</span> <span style="color: #b1b100;">Then</span></li><li style="" class="li1">                <span style="color: #b1b100;">Call</span> SendData<span style="color: #66cc66;">(</span>ToIndex, UserIndex, <span style="color: #cc66cc;">0</span>, <span style="color: #ffffff;">"||El usuario es inexistente o no esta conectado."</span> & FONTTYPE_INFO<span style="color: #66cc66;">)</span></li><li style="" class="li1">        <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li><li style="" class="li2">        <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="" class="li1"> </li><li style="" class="li1">       </li><li style="" class="li2">        tIndex = NameIndex<span style="color: #66cc66;">(</span>ReadField<span style="color: #66cc66;">(</span><span style="color: #cc66cc;">1</span>, rdata, <span style="color: #b1b100;">Asc</span><span style="color: #66cc66;">(</span><span style="color: #ffffff;">" "</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li><li style="" class="li1">        rdata = ReadField<span style="color: #66cc66;">(</span><span style="color: #cc66cc;">2</span>, rdata, <span style="color: #b1b100;">Asc</span><span style="color: #66cc66;">(</span><span style="color: #ffffff;">" "</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li><li style="" class="li1">        <span style="color: #b1b100;">If</span> EsNewbie<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span> <span style="color: #b1b100;">Then</span></li><li style="" class="li2">        <span style="color: #b1b100;">Call</span> SendData<span style="color: #66cc66;">(</span>ToIndex, UserIndex, <span style="color: #cc66cc;">0</span>, <span style="color: #ffffff;">"||Lo sentimos, los newbies no pueden transferirse oro."</span> & FONTTYPE_INFO<span style="color: #66cc66;">)</span></li><li style="" class="li1">        <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li><li style="" class="li1">        <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="" class="li2">       </li><li style="" class="li1">        <span style="color: #b1b100;">If</span> tIndex < <span style="color: #cc66cc;">1</span> <span style="color: #b1b100;">Then</span></li><li style="" class="li1">            <span style="color: #b1b100;">Call</span> SendData<span style="color: #66cc66;">(</span>ToIndex, UserIndex, <span style="color: #cc66cc;">0</span>, <span style="color: #ffffff;">"||El usuario es inexistente o no esta conectado."</span> & FONTTYPE_INFO<span style="color: #66cc66;">)</span></li><li style="" class="li2">        <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="" class="li1"> </li><li style="" class="li1">       </li><li style="" class="li2">        <span style="color: #b1b100;">If</span> rdata < <span style="color: #cc66cc;">1</span> <span style="color: #b1b100;">Then</span> <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li><li style="" class="li1">       </li><li style="" class="li1">        <span style="color: #b1b100;">If</span> rdata > UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Stats</span>.<span style="color: #66cc66;">GLD</span> <span style="color: #b1b100;">Then</span> </li><li style="" class="li2">            <span style="color: #b1b100;">Call</span> SendData<span style="color: #66cc66;">(</span>ToIndex, UserIndex, <span style="color: #cc66cc;">0</span>, <span style="color: #ffffff;">"||No tienes suficiente oro."</span> & FONTTYPE_INFO<span style="color: #66cc66;">)</span></li><li style="" class="li1">        <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li><li style="" class="li1">        <span style="color: #b1b100;">end</span> <span style="color: #b1b100;">if</span></li><li style="" class="li2">       </li><li style="" class="li1">        <span style="color: #b1b100;">Call</span> SendData<span style="color: #66cc66;">(</span>ToIndex, UserIndex, <span style="color: #cc66cc;">0</span>, <span style="color: #ffffff;">"||Le has entregado "</span> & rdata & <span style="color: #ffffff;">" de oro a "</span> & UserList<span style="color: #66cc66;">(</span>tIndex<span style="color: #66cc66;">)</span>.<span style="color: #b1b100;">Name</span> & <span style="color: #ffffff;">"."</span> & FONTTYPE_VENENO<span style="color: #66cc66;">)</span></li><li style="" class="li1">        <span style="color: #b1b100;">Call</span> SendData<span style="color: #66cc66;">(</span>ToIndex, tIndex, <span style="color: #cc66cc;">0</span>, <span style="color: #ffffff;">"||"</span> & UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #b1b100;">Name</span> & <span style="color: #ffffff;">" te dio "</span> & rdata & <span style="color: #ffffff;">" de oro."</span> & FONTTYPE_VENENO<span style="color: #66cc66;">)</span></li><li style="" class="li2">        UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Stats</span>.<span style="color: #66cc66;">GLD</span> = UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Stats</span>.<span style="color: #66cc66;">GLD</span> - rdata</li><li style="" class="li1">        UserList<span style="color: #66cc66;">(</span>tIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Stats</span>.<span style="color: #66cc66;">GLD</span> = UserList<span style="color: #66cc66;">(</span>tIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Stats</span>.<span style="color: #66cc66;">GLD</span> + rdata</li><li style="" class="li1">        SendUserStatsBox <span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span></li><li style="" class="li2">        SendUserStatsBox <span style="color: #66cc66;">(</span>tIndex<span style="color: #66cc66;">)</span></li><li style="" class="li1">       </li><li style="" class="li1">        <span style="color: #b1b100;">If</span> UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">flags</span>.<span style="color: #66cc66;">Privilegios</span> > <span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">Then</span></li><li style="" class="li2">        <span style="color: #b1b100;">Call</span> LogGM<span style="color: #66cc66;">(</span>UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #b1b100;">Name</span>, <span style="color: #ffffff;">"/Transferir "</span> & UserList<span style="color: #66cc66;">(</span>tIndex<span style="color: #66cc66;">)</span>.<span style="color: #b1b100;">Name</span> & <span style="color: #ffffff;">" "</span> & rdata, <span style="color: #66cc66;">(</span>UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">flags</span>.<span style="color: #66cc66;">Privilegios</span> = <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li><li style="" class="li1">        <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="" class="li1">        <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li><li style="" class="li2"> </li><li style="" class="li1"> </li></ol></div>[/vb]



lo q me quedo en duda es esto
[vb]<div class="vb" id="{CB}" style="font-family: monospace;"><ol><li style="" class="li1">        tIndex = NameIndex<span style="color: #66cc66;">(</span>ReadField<span style="color: #66cc66;">(</span><span style="color: #cc66cc;">1</span>, rdata, <span style="color: #b1b100;">Asc</span><span style="color: #66cc66;">(</span><span style="color: #ffffff;">" "</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li><li style="" class="li1">        rdata = ReadField<span style="color: #66cc66;">(</span><span style="color: #cc66cc;">2</span>, rdata, <span style="color: #b1b100;">Asc</span><span style="color: #66cc66;">(</span><span style="color: #ffffff;">" "</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li></ol></div>[/vb]
 

elnick

Newbie Lvl 3
[vb]
 
If UCase$(Left$(rdata, 10)) = "/TRANSFER " Then
    rdata = Right$(rdata, Len(rdata) - 10)
    If Len(rdata) < 3 Then ' que onda con esto?
            Call SendData(ToIndex, UserIndex, 0, "||El usuario es inexistente o no esta conectado." & FONTTYPE_INFO)
   Exit Sub
  End If
'este te lo puse al principio
    If EsNewbie(UserIndex) Then
    Call SendData(ToIndex, UserIndex, 0, "||Lo sentimos, los newbies no pueden transferirse oro." & FONTTYPE_INFO)
    Exit Sub
    End If
  ' exit Sub no va aca, sino siempre se sale
 
    ' aca falta
    rData = Right$(rData, Len(rData)-10)
    tIndex = NameIndex(ReadField(1, rdata, Asc(" ")))
    rdata = ReadField(2, rdata, Asc(" "))
   
    If tIndex < 1 Then
        Call SendData(ToIndex, UserIndex, 0, "||El usuario es inexistente o no esta conectado." & FONTTYPE_INFO)
Exit Sub 'faltaba esto
    End If
 
    If rdata < 1 Then Exit Sub
   
    If rdata > UserList(UserIndex).Stats.GLD Then Exit Sub
   
    Call SendData(ToIndex, UserIndex, 0, "||Le has entregado " & rdata & " de oro a " & UserList(tIndex).Name & "." & FONTTYPE_VENENO)
    Call SendData(ToIndex, tIndex, 0, "||" & UserList(UserIndex).Name & " te dio " & rdata & " de oro." & FONTTYPE_VENENO)
    UserList(UserIndex).Stats.GLD = UserList(UserIndex).Stats.GLD - rdata
    UserList(tIndex).Stats.GLD = UserList(tIndex).Stats.GLD + rdata
    SendUserStatsBox (UserIndex)
    SendUserStatsBox (tIndex)
   
    If UserList(UserIndex).flags.Privilegios > 0 Then
    Call LogGM(UserList(UserIndex).Name, "/Transferir " & UserList(tIndex).Name & " " & rdata, (UserList(UserIndex).flags.Privilegios = 1))
    End If
            Exit Sub 'mejor ponelo aca, asi no haces 1 linea de mas <!-- s:p --><img src=\"{SMILIES_PATH}/icon_razz.gif\" alt=\":p\" title=\"Razz\" /><!-- s:p -->
End If
 
 [/vb]

Fijate si con eso te anda, eran errores chicos

Saludos ^^
 

facundo

Oráculo Lvl 3
Busca

Select Case UCase$(Left$(rdata, 10))

Y abajo pone


[vb]<div class="vb" id="{CB}" style="font-family: monospace;"><ol><li style="" class="li1"><span style="color: #b1b100;">Case</span> <span style="color: #ffffff;">"/TRANSFER"</span></li><li style="" class="li1">Select <span style="color: #b1b100;">Case</span> <span style="color: #b1b100;">UCase</span>$<span style="color: #66cc66;">(</span><span style="color: #b1b100;">Left</span>$<span style="color: #66cc66;">(</span>rdata, <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li><li style="" class="li2">    rdata = <span style="color: #b1b100;">Right</span>$<span style="color: #66cc66;">(</span>rdata, <span style="color: #b1b100;">Len</span><span style="color: #66cc66;">(</span>rdata<span style="color: #66cc66;">)</span> - <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">)</span>   </li><li style="" class="li1">    tStr = ReadField<span style="color: #66cc66;">(</span><span style="color: #cc66cc;">1</span>, rdata, <span style="color: #b1b100;">asc</span><span style="color: #66cc66;">(</span><span style="color: #ffffff;">" "</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li><li style="" class="li1">    tIndex = NameIndex<span style="color: #66cc66;">(</span>tStr<span style="color: #66cc66;">)</span></li><li style="" class="li2">    arg1 = ReadField<span style="color: #66cc66;">(</span><span style="color: #cc66cc;">2</span>, rdata, <span style="color: #b1b100;">Asc</span><span style="color: #66cc66;">(</span><span style="color: #ffffff;">" "</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li><li style="" class="li1"> </li><li style="" class="li1">    <span style="color: #b1b100;">If</span> EsNewbie<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span> <span style="color: #b1b100;">Then</span></li><li style="" class="li2">    <span style="color: #b1b100;">Call</span> SendData<span style="color: #66cc66;">(</span>ToIndex, UserIndex, <span style="color: #cc66cc;">0</span>, <span style="color: #ffffff;">"||Lo sentimos, los newbies no pueden transferirse oro."</span> & FONTTYPE_INFO<span style="color: #66cc66;">)</span></li><li style="" class="li1">    <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li><li style="" class="li1">    <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="" class="li2">   </li><li style="" class="li1">    <span style="color: #b1b100;">If</span> tIndex <= <span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">Then</span></li><li style="" class="li1">        <span style="color: #b1b100;">Call</span> SendData<span style="color: #66cc66;">(</span>ToIndex, UserIndex, <span style="color: #cc66cc;">0</span>, <span style="color: #ffffff;">"||El usuario es inexistente o no esta conectado."</span> & FONTTYPE_INFO<span style="color: #66cc66;">)</span></li><li style="" class="li2">    <span style="color: #b1b100;">exit</span> <span style="color: #b1b100;">sub</span></li><li style="" class="li1">    <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="" class="li1"> </li><li style="" class="li2">    <span style="color: #b1b100;">If</span> arg1 > UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Stats</span>.<span style="color: #66cc66;">GLD</span> <span style="color: #b1b100;">Then</span> <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li><li style="" class="li1">   </li><li style="" class="li1"> </li><li style="" class="li2">    <span style="color: #b1b100;">Call</span> SendData<span style="color: #66cc66;">(</span>ToIndex, UserIndex, <span style="color: #cc66cc;">0</span>, <span style="color: #ffffff;">"||Le has entregado "</span> & arg1 & <span style="color: #ffffff;">" de oro a "</span> & UserList<span style="color: #66cc66;">(</span>tIndex<span style="color: #66cc66;">)</span>.<span style="color: #b1b100;">Name</span> & <span style="color: #ffffff;">"."</span> & FONTTYPE_VENENO<span style="color: #66cc66;">)</span></li><li style="" class="li1">    <span style="color: #b1b100;">Call</span> SendData<span style="color: #66cc66;">(</span>ToIndex, tIndex, <span style="color: #cc66cc;">0</span>, <span style="color: #ffffff;">"||"</span> & UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #b1b100;">Name</span> & <span style="color: #ffffff;">" te dio "</span> & arg1 & <span style="color: #ffffff;">" de oro."</span> & FONTTYPE_VENENO<span style="color: #66cc66;">)</span></li><li style="" class="li1">    UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Stats</span>.<span style="color: #66cc66;">GLD</span> = UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Stats</span>.<span style="color: #66cc66;">GLD</span> - arg1</li><li style="" class="li2">    UserList<span style="color: #66cc66;">(</span>tIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Stats</span>.<span style="color: #66cc66;">GLD</span> = UserList<span style="color: #66cc66;">(</span>tIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">Stats</span>.<span style="color: #66cc66;">GLD</span> + arg1</li><li style="" class="li1">    SendUserStatsBox <span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span></li><li style="" class="li1">    SendUserStatsBox <span style="color: #66cc66;">(</span>tIndex<span style="color: #66cc66;">)</span></li><li style="" class="li2">   </li><li style="" class="li1">    <span style="color: #b1b100;">If</span> UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #66cc66;">flags</span>.<span style="color: #66cc66;">Privilegios</span> > <span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">Then</span></li><li style="" class="li1">     <span style="color: #b1b100;">Call</span> LogGM<span style="color: #66cc66;">(</span>UserList<span style="color: #66cc66;">(</span>UserIndex<span style="color: #66cc66;">)</span>.<span style="color: #b1b100;">Name</span>, <span style="color: #ffffff;">"/Transferir "</span> & UserList<span style="color: #66cc66;">(</span>tIndex<span style="color: #66cc66;">)</span>.<span style="color: #b1b100;">Name</span> & <span style="color: #ffffff;">" "</span> & arg1, <span style="color: #b1b100;">False</span><span style="color: #66cc66;">)</span></li><li style="" class="li2">     <span style="color: #b1b100;">exit</span> <span style="color: #b1b100;">sub</span></li><li style="" class="li1">    <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="" class="li1"> </li><li style="" class="li2">    <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li></ol></div>[/vb]

Por ahi tiene un error.. Fijate
 
Estado
Cerrado para nuevas respuestas.
Arriba