set .@n$,"Warp Mistress"; // Nombre del NPC.
set $@WEm,2; // Modo Evolution. (0 = off | 1 = Player | 2 = Account | 3 = Global)
set .@p,0; // Guardar Punto de Inicio. (-1 = off | Precio)
// [--------------------------------------------------------]
// [ Final de la configuración. ]
// [========================================================]
set .@a,1;
while(!setnpcdisplay("WE#"+.@a,.@n$+"#"+.@a)) set .@a,.@a + 1;
set $@WE$,"^008888"+.@n$+"^000000";
if($@WEm == 2) set $@WEm$,"#";
if($@WEm == 3) set $@WEm$,"$";
if(.@p >= 0) {
set $@WE,1;
set $@WEb1$,"Guardar Punto de Inicio.";
set $@WEc1,.@p;
set $@WEd0[0],1;
}
// [--------------------------------------------------------]
// [ Configuración de destinos: ]
// [========================================================]
// Declaración de Grupos de Destinos:
// callsub Onc0,{"Nombre"},{Precio};
// Crea un nuevo Grupo de Destinos dentro del menú principal del npc.
// Los Grupos de Destinos agrupan los diferentes Destinos con un mismo precio.
// Ejemplo: Ciudades / Mazmorras / Áreas de WoE
// Declaración de Destinos:
// callsub Onc1,{Id},{"Nombre"},{"Mapa"},{x},{y},{"Mapa Activación 1"},{"Mapa Activación 2"},{...},{"Mapa Activación #"};
// Crea un nuevo Destino dentro del último Grupo de Destinos declarado.
// {Id}: Identificador único del destino. Ponedlo a 0 si queréis desactivar el Modo Evolution.
// {"Mapa Activación #"}:
// En Modo Evolution, cuando un jugador se situe en cualquiera de estos mapas, el destino le quedará desbloqueado.
// Esta lista de mapas es también utilizada para hacer el recuento de personas en cada destino.
// Declaración de Submenús:
// callsub Onc2,{"Nombre"};
// Crea un nuevo Submenú dentro del último Grupo de Destinos declarado.
// Es útil para agrupar diferentes Destinos relacionados, por ejemplo para los niveles de una Dungeon.
// Para cerrar un submenú, debeis utilizar la misma función sin argumentos.
// callsub Onc2;
// WoE Areas:
callsub Onc0,"Viajar a un Área de WoE.",1500;
callsub Onc1,0,"Britoniah","gef_fild13",186,242,"gef_fild13","gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05","gld_dun04";
callsub Onc1,0,"Greenwood Lake","pay_gld",196,165,"pay_gld","payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05","gld_dun01";
callsub Onc1,0,"Luina","alde_gld",228,153,"alde_gld","aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05","gld_dun02";
callsub Onc1,0,"Nidhoggur","sch_gld",287,123,"sch_gld","schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05","schg_dun01";
callsub Onc1,0,"Valfreyja","aru_gld",187,325,"aru_gld","arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05","arug_dun01";
callsub Onc1,0,"Valkyrie Realm","prt_gld",160,75,"prt_gld","prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05","gld_dun03";
// Identificadores disponibles: [22,30] U [68,90] U [194,...)
// [--------------------------------------------------------]
// [ Final de la configuración de destinos. ]
// [========================================================]
set $@WE,0;
set $@WEm,0;
set $@WEd[0],0;
set $@WEd[1],0;
end;
// Declaración del Grupos de Destinos:
// getarg(0): Nombre.
// getarg(1): Precio.
Onc0:
set $@WE,$@WE + 1;
set getd("$@WEb"+$@WE+"$"),getarg(0);
set getd("$@WEc"+$@WE),getarg(1);
set .@a,getarraysize($@WEd0);
set $@WEd0[.@a],$@WE;
set $@WEd[0],$@WE;
set $@WEd[1],0;
return;
// Declaración de Destinos:
// getarg(0): Id.
// getarg(1): Nombre.
// getarg(2): Mapa.
// getarg(3): x.
// getarg(4): y.
Onc1:
if($@WEd[0]) {
set $@WE,$@WE + 1;
if($@WEm) set .@a,getarg(0);
set getd("$@WEa"+$@WE),.@a;
set getd("$@WEb"+$@WE+"$"),getarg(1);
set getd("$@WEe"+$@WE+"$"),getarg(2);
set getd("$@WEf"+$@WE),getarg(3);
set getd("$@WEg"+$@WE),getarg(4);
set .@b,5;
while(getarg(.@b,"") != "") { // Mapas de activación:
set .@m$,getarg(.@b);
set getd("$@WEh"+$@WE+"$["+(.@b - 5)+"]"),.@m$;
if(.@a) {
setmapflag .@m$,42;
set getd("$@WE_"+.@m$+"["+getarraysize(getd("$@WE_"+.@m$))+"]"),$@WE;
}
set .@b,.@b + 1;
}
set .@a,$@WEd[getarraysize($@WEd) - 1];
set .@b,getarraysize(getd("$@WEd"+.@a));
set getd("$@WEd"+.@a+"["+.@b+"]"),$@WE;
}
return;
// Declaración de Submenús:
// getarg(0): Nombre.
Onc2:
if($@WEd[0]) {
if(getarg(0,"") == "") set $@WEd[1],0;
else {
set $@WE,$@WE + 1;
set getd("$@WEb"+$@WE+"$"),getarg(0);
set .@a,$@WEd[0];
set .@b,getarraysize(getd("$@WEd"+.@a));
set getd("$@WEd"+.@a+"["+.@b+"]"),$@WE;
set $@WEd[1],$@WE;
}
}
return;
// Activación de Destinos:
OnPCLoadMapEvent:
getmapxy .@m$,.@x,.@y,0;
set .@a,getarraysize(getd("$@WE_"+.@m$));
while(.@a > 0) {
set .@a,.@a - 1;
set .@b,getd("$@WE_"+.@m$+"["+.@a+"]");
set .@c,getd("$@WEa"+.@b);
set .@d,getd($@WEm$+"WE_"+(.@c / 31));
if(!(.@d & pow(2,.@c % 31))) {
if($@WEm$ == "$") set .@e,0;
else set .@e,3;
announce "Nuevo destino desactivado: "+getd("$@WEb"+.@b+"$")+".",.@e,0x00ccdd;
set getd($@WEm$+"WE_"+(.@c / 31)),.@d + pow(2,.@c % 31);
}
}
end;
}
// Npcs:
- script WE#0::WE -1,{
mes $@WE$;
mes "Hola "+strcharinfo(0)+".";
mes "¿En que puedo ayudarte?";
next;
while(.@a < getarraysize($@WEd0)) {
set .@b,$@WEd0[.@a];
set .@a$[.@a],getd("$@WEb"+.@b+"$");
set .@b,getd("$@WEc"+.@b);
if(.@b) {
if(Zeny < .@b) set .@a$[.@a],"^bbbbbb"+.@a$[.@a]+" ^bb0000("+.@b+" z)^000000";
else set .@a$[.@a],.@a$[.@a]+" ^00bb00("+.@b+" z)^000000";
}
set .@a,.@a + 1;
}
set .@a,select("^880000Salir^000000",.@a$[0],.@a$[1],.@a$[2],.@a$[3],.@a$[4],.@a$[5],.@a$[6],.@a$[7],.@a$[8],.@a$[9],.@a$[10],.@a$[11],.@a$[12],.@a$[13],.@a$[14],.@a$[15],.@a$[16],.@a$[17],.@a$[18],.@a$[19]);
if(.@a == 1) {
mes $@WE$;
mes "Hasta pronto.";
emotion 12;
close;
}
set .@a,$@WEd0[.@a - 2];
set .@b,getd("$@WEc"+.@a);
callsub Ona0,.@b;
mes $@WE$;
if(.@a == 1) {
getmapxy .@m$,.@x,.@y,0;
set Zeny,Zeny - .@b;
mes "Muy bien.";
mes "A partir de ahora este lugar quedará guardado como tu Punto de Inicio.";
save .@m$,.@x,.@y;
specialeffect2 500;
close2;
emotion 12;
end;
}
mes "Elige tu Destino.";
next;
do {
cleararray .@a$[0],"",getarraysize(.@a$);
set .@c,0;
while(.@c < getarraysize(getd("$@WEd"+.@a))) {
set .@d,getd("$@WEd"+.@a+"["+.@c+"]");
set .@e,getd("$@WEa"+.@d);
set .@b$,"bbbbbb";
set .@c$,"";
if(getd("$@WEe"+.@d+"$") == "") {
set .@g,getarraysize(getd("$@WEd"+.@d));
set .@f,0;
while(.@g && !.@f) {
set .@g,.@g - 1;
set .@e,getd("$@WEa"+getd("$@WEd"+.@d+"["+.@g+"]"));
if(!.@e || (getd($@WEm$+"WE_"+(.@e / 31)) & pow(2,.@e % 31))) set .@f,1;
}
if(.@f) set .@b$,"000000";
}
else if(!.@e || (getd($@WEm$+"WE_"+(.@e / 31)) & pow(2,.@e % 31))) {
set .@b$,"000000";
set .@g,0;
set .@f,getarraysize(getd("$@WEh"+.@d+"$"));
while(.@f > 0) {
set .@f,.@f - 1;
set .@g,.@g + getmapusers(getd("$@WEh"+.@d+"$["+.@f+"]"));
}
if(.@g) set .@c$,"00bb00";
else set .@c$,"aaaaaa";
set .@c$," [^"+.@c$+""+.@g+"^000000]";
}
set .@a$[.@c],"^"+.@b$+""+getd("$@WEb"+.@d+"$")+"^000000"+.@c$;
set .@c,.@c + 1;
}
if(.@h) set .@b$,"Atrás";
else set .@b$,"Salir";
set .@c,select("^880000"+.@b$+"^000000",.@a$[0],.@a$[1],.@a$[2],.@a$[3],.@a$[4],.@a$[5],.@a$[6],.@a$[7],.@a$[8],.@a$[9],.@a$[10],.@a$[11],.@a$[12],.@a$[13],.@a$[14],.@a$[15],.@a$[16],.@a$[17],.@a$[18],.@a$[19],.@a$[20],.@a$[21],.@a$[22],.@a$[23],.@a$[24],.@a$[25],.@a$[26],.@a$[27],.@a$[28],.@a$[29],.@a$[30],.@a$[31],.@a$[32],.@a$[33],.@a$[34],.@a$[35],.@a$[36],.@a$[37],.@a$[38],.@a$[39],.@a$[40],.@a$[41],.@a$[42],.@a$[43],.@a$[44],.@a$[45],.@a$[46],.@a$[47],.@a$[48],.@a$[49]);
if(.@c == 1) {
if(.@h) {
set .@a,.@h;
set .@h,0;
}
else {
mes $@WE$;
mes "Hasta pronto.";
emotion 12;
close;
}
}
else {
set .@c,.@c - 2;
if(compare(.@a$[.@c],"^bbbbbb")) {
mes $@WE$;
mes "Lo siento.";
mes "Este destino aún no se encuentra disponible.";
emotion 40;
close;
}
set .@h,.@a;
set .@a,getd("$@WEd"+.@a+"["+.@c+"]");
}
} while(getd("$@WEe"+.@a+"$") == "");
callsub Ona0,.@b;
set Zeny,Zeny - .@b;
mes $@WE$;
mes "Muy bien.";
mes "Espera un segundo mientras te abro un portal...";
close2;
specialeffect2 71;
pcblockmove getcharid(3),1;
sleep2 500;
specialeffect2 402;
sleep2 500;
emotion 12;
specialeffect2 6;
sleep2 200;
specialeffect2 304;
warp getd("$@WEe"+.@a+"$"),getd("$@WEf"+.@a),getd("$@WEg"+.@a);
pcblockmove getcharid(3),0;
end;
Ona0:
set .@a,getarg(0);
if(Zeny < .@a) {
mes $@WE$;
mes "Lo siento.";
mes "Para utilizar este servicio deberás pagar ^880000"+.@a+" z^000000.";
emotion 40;
close;
}
return;
}
Question
kevo89
I really like my warper, and I would like you to help me put the last save to my script, could you help me? THX!!!
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.