Well, im looking for a way to give different(and random) options by index slot(0, 1 , 2, 3, 4 = 5 slots) and equipment slot( headgear, weapon, armor etc).
Based on that, found one script that do it but completely random and then i edited to do what i want.
But, once im newbie(or simple noob hehe) its obvious i got erros and lots of doubts.
Here's the full code:
Spoiler
//===== rAthena Script =======================================
//= Random Option SurviveRO
//===== By: ==================================================
//= Rizakh
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//= Atribui opcoes aleatorias aos equipamentos.
//= com o custo de X zeny/cash
//============================================================
prontera,143,182,3 script Piranha Safada 700,{
goto NPC;
end;
OnInit:
//==============================
// CONFIGURAÇÕES DE MOEDA
// 1 = Zeny
// 0 = Cashpoints
//==============================
set .moeda,1; // Moeda para comprar a opcao aleatoria
set .preco,1; // Preco da opcao aleatoria
//setarray .irq[0],990,7041; // Red Blood e Fine Grit
//setarray .iqt[0],1,1; // Quantidade de cada item
//==============================
// CONFIGURAÇÕES RANDOM OPTION
//==============================
set .sobrepor,1; // Permite sobrepor encantamentos existentes ( 0 = off )
set .falha,0; // Define a chance de falha (%)
//set .MaxOpt,192; // Maximum item option a player can enchant ( reference: https://github.com/rathena/rathena/blob/master/db/const.txt#L1645-L1836 )
//set .MinOpt,1; // Minimum item option a player can enchant
set .valmin,1; // Valor minimo a se tirar na opcao aleatoria
set .valmax,5; // Valor maximo a se tirar na opcao aleatoria
set .slotmax,4; // Maximo de slots para encantar( padrão = 0-4 )
set .espera,1; // Delay da barra de progresso em segundos
//============================
// IDS DAS RANDOM OPTIONS
// SEPARADAS POR EQUIPAMENTOS
// E SLOT (0 PARA 4 = 5 SLOTS)
//============================
// Equip Top Head Possible IDS
//============================
setarray .thd0[1], 13, 14, 11, 12, 16, 18,
3, 4, 5, 6, 7, 8,
20, 21, 22, 23, 24, 19;
setarray .thd1[1], 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35;
setarray .thd2[1],168,169,170,171,172,167;
setarray .thd3[1], 3, 4, 5, 6, 7, 8,
36, 38, 40, 42, 44, 46,
48, 50, 52, 54;
setarray .thd4[1], 3, 4, 5, 6, 7, 8,
56, 58, 60, 62, 64, 66,
68, 70, 72, 74;
//=============================
// Equip Mid Head Possible IDS
//=============================
setarray .mhd0[1], 3, 4, 5, 6, 7, 8;
setarray .mhd1[1], 87, 89, 90, 91, 92, 93,
94, 95, 96;
setarray .mhd2[1],168,169,170,171,172,167;
setarray .mhd3[1], 97, 98, 99,100,101,102,
103,104,105,106,107,108,
109,110,111,112,113,114,
115,116;
setarray .mhd4[1], 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20,
21, 22, 23, 24;
//==============================
// Equipe Low Head Possible IDS
//==============================
setarray .lhd0[1], 3, 4, 5, 6, 7, 8;
setarray .lhd1[1], 11, 12, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24;
setarray .lhd2[1],164,165,167,168,168, 18;
setarray .lhd3[1], 3, 4, 5, 6, 7, 8,
1, 2, 11, 12, 16;
setarray .lhd5[1], 37, 39, 41, 43, 45, 47,
49, 51, 53, 55;
//==============================
// Equipe Armor Possible IDS
//==============================
setarray .arm0[1], 76, 77, 78, 79, 80, 81,
82, 83, 84, 85;
setarray .arm1[1], 9, 10, 11, 12, 20, 21;
setarray .arm2[1], 87, 88, 89, 90, 91, 92,
93, 94, 95, 96,107,108,
109,110,111,112,113,114,
115,116;
setarray .arm3[1], 3, 4, 5, 6, 7, 8,
21, 20;
setarray .arm5[1],186,167,160,161,162,165;
//==============================
// Equipe RHand Possible IDS
//==============================
setarray .rwp0[1],175,176,177,178,179,180,
181,182,183,184;
setarray .rwp1[1], 13, 18, 19, 15, 16, 24,
3, 4, 5, 6, 7, 8;
setarray .rwp2[1], 37, 39, 41, 43, 45, 47,
49, 51, 53, 55, 57, 59,
61, 63, 65, 67, 69, 71,
73, 75;
setarray .rwp3[1],147,148,151,152,153,154,
155,156,164,158,159,157;
setarray .rwp5[1],166,173,174,185,187,188,
189,117,118,119,120,121,
122,123,124,125,126;
//==============================
// Equipe LHand Possible IDS
//==============================
setarray .lwp0[1], 1, 2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12,
15, 16, 18, 20, 21, 22,
23, 24;
setarray .lwp1[1], 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35;
setarray .lwp2[1], 87, 88, 89, 90, 91, 92,
93, 94, 95, 96;
setarray .lwp3[1],160,161,162,165,167,190,
191,192;
setarray .lwp5[1],149,150,151,152, 11, 12;
//==============================
// Equipe Garment Possible IDS
//==============================
setarray .gar0[1], 1, 2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24;
setarray .gar1[1], 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35;
setarray .gar2[1],117,118,119,120,121,122,
123,124,125,126;
setarray .gar3[1],127,128,129,130,131,132,
133,134,135,136,137,138,
139,140,141,142,143,144,
145,146,153,154,155,156;
setarray .gar5[1],163,165,167,190,191,192;
//==============================
// Equipe Shoes Possible IDS
//==============================
setarray .shs0[1], 1, 2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24;
setarray .shs1[1],187,188,189,157,158,159;
setarray .shs2[1],151,152,149,147;
setarray .shs3[1],100,101,102,103,104,105,
106,107,108,109,110,111,
112,113,114,115,116;
setarray .shs5[1], 37, 39, 41, 43, 45, 47,
49, 51, 53, 55, 57, 59,
61, 63, 65, 67, 69, 71,
73, 75;
//==============================
// Equipe RAccessory Possible IDS
//==============================
setarray .rac0[1], 3, 4, 5, 6, 7, 8;
setarray .rac1[1], 1, 2, 9, 10, 11, 12;
setarray .rac2[1], 15, 16, 18, 22, 23, 24;
setarray .rac3[1], 13, 14, 17, 19,166,163;
setarray .rac5[1],168,169,170,171,172,173,
174,117,118,119,120,121,
122,123,124,125,126;
//==============================
// Equipe LAcessory Possible IDS
//==============================
setarray .lac0[1], 3, 4, 5, 6, 7, 8;
setarray .lac1[1], 1, 2, 9, 10, 11, 12;
setarray .lac2[1], 15, 16, 18, 22, 23, 24;
setarray .lac3[1], 13, 14, 17, 19,166,163;
setarray .lac5[1],168,169,170,171,172,173,
174,117,118,119,120,121,
122,123,124,125,126;
//==============================
// FIM DAS CONFIGURAÇÕES DE ID
// PARA RANDOM Option
//==============================
end;
NPC:
disable_items;
mes "[ Neight ]";
mes "Olá jovem!";
mes "Eu estou pesquisando uma";
mes "forma de adicionar";
mes "encantamentos ^FF0000aleatórios^000000";
mes "em um equipamento.";
next;
mes "[ Neight ]";
mes "Eu posso fazer qualquer um dos seus";
mes "equipamentos mais fortes";
mes "do que suas versões atuais...";
next;
mes "[ Neight ]";
if(.moeda){
mes "Por um preço de ^0000FF"+.preco+" Zeny^000000,";
mes "e também","1x ^0000FF"+ getitemname(990) +"^000000","1x ^0000FF"+ getitemname(7041) +"^000000";
} else {
mes "Por um preço de ^0000FF"+.preco+" Cashpoints^000000,";
mes "e também","1x ^0000FF"+ getitemname(990) +"^000000","1x ^0000FF"+ getitemname(7041) +"^000000";
}
mes "Eu vou aplicar uma opção ^FF0000ALEATÓRIA^000000";
mes "no seu equipamento";
next;
mes "[ Neight ]";
mes "Eu esqueci de mencionar que";
mes "há uma chance de ^FF0000"+.falha+"%^000000 ";
mes "que o processo ^FF0000FALHE^000000";
mes "e eu perca seu equipamento junto...";
next;
mes "[ Neight ]";
mes "Você gostaria de arriscar";
mes "encantar seu item com uma chance de";
mes "^FF0000"+.falha+"%^000000 de ^FF0000Falhe^000000";
mes "e perder seu equipamento?";
next;
if(select("Nem! Tô de boas...:^0000FFEu vou testar minha sorte! Encante meu equipamento!^000000")==1) goto OnCancel;
mes "[ Neight ]";
mes "Esplêndido!";
mes "Este processo levará";
mes "cerca de ^0000FF"+.espera+"^000000 segundos...";
mes "Não mova um músculo enquanto";
mes "eu encanto seu equipamento";
close2;
if(countitem(990) < 1 && countitem(7041) < 1)
goto PriceFail;
setarray .@eq[1], EQI_HEAD_TOP,EQI_HEAD_MID,EQI_HEAD_LOW,EQI_ARMOR,EQI_HAND_R,EQI_HAND_L,EQI_GARMENT,EQI_SHOES,EQI_ACC_R,EQI_ACC_L;
for(set .@i,1; .@i<getarraysize(.@eq); set .@i,.@i+1){
if(getequipisequiped(.@eq[.@i])){
set .@menu$,.@menu$+F_getpositionname(.@eq[.@i])+" ~ [ " + getequipname(.@eq[.@i]) + " ]";
set .@equipado,1;
} set .@menu$,.@menu$+":";
} set .@part,.@eq[select(.@menu$)];
set .@val, rand(.valmin,.valmax);
set .@indx,rand(.slotmax);
if(!.sobrepor){
if(getequiprandomoption(.@part,4,ROA_ID,getcharid(0))) set .@x4,4;
if(getequiprandomoption(.@part,3,ROA_ID,getcharid(0))) set .@x3,3;
if(getequiprandomoption(.@part,2,ROA_ID,getcharid(0))) set .@x2,2;
if(getequiprandomoption(.@part,1,ROA_ID,getcharid(0))) set .@x1,1;
if(getequiprandomoption(.@part,0,ROA_ID,getcharid(0))) set .@x0,0;
if(.@indx == 0 && .@x0)
if(.@indx==.slotmax) goto OnMax;
else set .@indx,1;
if(.@indx == 1 && .@x1)
if(.@indx==.slotmax) goto OnMax;
else set .@indx,2;
if(.@indx == 2 && .@x2)
if(.@indx==.slotmax) goto OnMax;
else set .@indx,3;
if(.@indx == 3 && .@x3)
if(.@indx==.slotmax) goto OnMax;
else set .@indx,4;
if(.@indx == 4 && .@x4)
if(.@indx==.slotmax) goto OnMax;
}
if(.@indx == 4 && (!getequiprandomoption(.@part,3,ROA_ID,getcharid(0)))) set .@indx,3;
if(.@indx == 3 && (!getequiprandomoption(.@part,2,ROA_ID,getcharid(0)))) set .@indx,2;
if(.@indx == 2 && (!getequiprandomoption(.@part,1,ROA_ID,getcharid(0)))) set .@indx,1;
if(.@indx == 1 && (!getequiprandomoption(.@part,0,ROA_ID,getcharid(0)))) set .@indx,0;
if(.@part == EQI_HEAD_TOP)
goto THead;
if(.@part == EQI_HEAD_MID)
goto MHead;
if(.@part == EQI_HEAD_LOW)
goto LHead;
if(.@part == EQI_ARMOR)
goto Armor;
if(.@part == EQI_HAND_R)
goto RHand;
if(.@part == EQI_HAND_L)
goto LHand;
if(.@part == EQI_GARMENT)
goto Garment;
if(.@part == EQI_SHOES)
goto Shoes;
if(.@part == EQI_ACC_R)
goto RAcc;
if(.@part == EQI_ACC_L)
goto LAcc;
THead:
if(.@indx == 0)
set .@opt,.thd0[rand(1,18)];
if(.@indx == 1)
set .@opt,.thd1[rand(1,11)];
if(.@indx == 2)
set .@opt,rand(.thd2);
if(.@indx == 3)
set .@opt,rand(.thd3);
if(.@indx == 4)
set .@opt,rand(.thd4);
MHead:
if(.@indx == 0)
set .@opt,rand(.mhd0);
if(.@indx == 1)
set .@opt,rand(.mhd1);
if(.@indx == 2)
set .@opt,rand(.mhd2);
if(.@indx == 3)
set .@opt,rand(.mhd3);
if(.@indx == 4)
set .@opt,rand(.mhd4);
LHead:
if(.@indx == 0)
set .@opt,rand(.lhd0);
if(.@indx == 1)
set .@opt,rand(.lhd1);
if(.@indx == 2)
set .@opt,rand(.lhd2);
if(.@indx == 3)
set .@opt,rand(.lhd3);
if(.@indx == 4)
set .@opt,rand(.lhd4);
Armor:
if(.@indx == 0)
set .@opt,rand(.arm0);
if(.@indx == 1)
set .@opt,rand(.arm1);
if(.@indx == 2)
set .@opt,rand(.arm2);
if(.@indx == 3)
set .@opt,rand(.arm3);
if(.@indx == 4)
set .@opt,rand(.arm4);
RHand:
if(.@indx == 0)
set .@opt,rand(.rwp0);
if(.@indx == 1)
set .@opt,rand(.rwp1);
if(.@indx == 2)
set .@opt,rand(.rwp2);
if(.@indx == 3)
set .@opt,rand(.rwp3);
if(.@indx == 4)
set .@opt,rand(.rwp4);
LHand:
if(.@indx == 0)
set .@opt,rand(.lwp0);
if(.@indx == 1)
set .@opt,rand(.lwp1);
if(.@indx == 2)
set .@opt,rand(.lwp2);
if(.@indx == 3)
set .@opt,rand(.lwp3);
if(.@indx == 4)
set .@opt,rand(.lwp4);
Garment:
if(.@indx == 0)
set .@opt,rand(.gar0);
if(.@indx == 1)
set .@opt,rand(.gar1);
if(.@indx == 2)
set .@opt,rand(.gar2);
if(.@indx == 3)
set .@opt,rand(.gar3);
if(.@indx == 4)
set .@opt,rand(.gar4);
Shoes:
if(.@indx == 0)
set .@opt,rand(.shs0);
if(.@indx == 1)
set .@opt,rand(.shs1);
if(.@indx == 2)
set .@opt,rand(.shs2);
if(.@indx == 3)
set .@opt,rand(.shs3);
if(.@indx == 4)
set .@opt,rand(.shs4);
RAcc:
if(.@indx == 0)
set .@opt,rand(.rac0);
if(.@indx == 1)
set .@opt,rand(.rac1);
if(.@indx == 2)
set .@opt,rand(.rac2);
if(.@indx == 3)
set .@opt,rand(.rac3);
if(.@indx == 4)
set .@opt,rand(.rac4);
LAcc:
if(.@indx == 0)
set .@opt,rand(.lac0);
if(.@indx == 1)
set .@opt,rand(.lac1);
if(.@indx == 2)
set .@opt,rand(.lac2);
if(.@indx == 3)
set .@opt,rand(.lac3);
if(.@indx == 4)
set .@opt,rand(.lac4);
progressbar "ffff00",.espera;
if(.moeda){
if(Zeny < .preco)
goto PriceFail;
else
set Zeny,Zeny-.preco;
delitem 990,1;
delitem 7041,1;
} else {
if(#CASHPOINTS < .preco)
goto PriceFail;
else
set #CASHPOINTS,#CASHPOINTS-.preco;
delitem 990,1;
delitem 7041,1;
}
// Falha...
if(.falha > 100) set .falha,100;
if(rand(100) <= .falha) goto OnFailure;
// Sucesso!!
specialeffect2 154;
setrandomoption(.@part,.@indx,.@opt,.@val,.@indx,getcharid(0));
end;
OnMax:
mes "[ Neight ]";
mes "Ops... Seu equipamento ja";
mes "foi encantado ao máximo!";
mes " ";
mes "Perdão, mas, não posso";
mes "adicionar mais encantamentos";
mes "ao seu item.";
close;
OnFailure:
specialeffect2 EF_PHARMACY_FAIL;
mes "[ Neight ]"," ";
mes "Me perdoe..."," ";
mes "^FF0000O processo falhou...";
mes "Seu item foi destruído.^000000";
delequip .@part;
close;
PriceFail:
mes "[ Neight ]";
mes "O que e isso?";
mes "Você está brincando comigo?";
mes "Perdão, mas, eu não trabalho";
mes "de graça!";
mes "Você pode voltar quando";
mes "tiver dinheiro para me pagar";
mes "pelos meus serviços.";
close;
OnCancel:
mes "[ Neight ]";
mes "Vista-se.";
mes "Deixe-me saber caso";
mes "você mude de ideia";
close;
}
I really want to give credits for the person that created this script, used by me to create this one above, but, im really dont know who did it (if you are the owner or know him, pls contact me)
Original:
Spoiler
celestiaj,63,82,3 script Neight 700,{
goto NPC;
end;
OnInit:
//==============================
// CURRENCY SETTING
// 1 = Zeny
// 0 = Cashpoints
//==============================
set .Currency,1; // Currency to buy random option
set .Price,10000; // Prize of random option
setarray .irq[0],990,7041; // Red Blood e Fine Grit
setarray .iqt[0],1,1; // Quantidade de cada item
//==============================
// RANDOM OPTION SETTING
//==============================
set .OverWrite,1; // Allows overwriting the already existing option enchantment ( 0 to disable )
set .FailRate,40; // Sets fail chance
set .MaxOpt,192; // Maximum item option a player can enchant ( reference: https://github.com/rathena/rathena/blob/master/db/const.txt#L1645-L1836 )
set .MinOpt,1; // Minimum item option a player can enchant
set .MinValue,1; // Minimum option effect value
set .MaxValue,10; // Maximum option effect value
set .MaxIndex,4; // Maximum option slots ( default is 0 to 4 )
set .Wait,1; // Progress bar delay in seconds
// Random option that will not be applied
setarray .ignore[0],
86, // RDMOPT_BODY_ATTR_ALL
end;
NPC:
disable_items;
mes "[ Neight ]";
mes "Olá jovem!";
mes "Eu estou pesquisando uma";
mes "forma de adicionar";
mes "encantamentos ^FF0000aleatórios^000000";
mes "em um equipamento.";
next;
mes "[ Neight ]";
mes "Eu posso fazer qualquer um dos seus";
mes "equipamentos mais fortes";
mes "do que suas versões atuais...";
next;
mes "[ Neight ]";
if(.Currency){
mes "Por um preço de ^0000FF"+.Price+" Zeny^000000,";
mes "e também","1x ^0000FF"+ getitemname(990) +"^000000","1x ^0000FF"+ getitemname(7041) +"^000000";
} else {
mes "Por um preço de ^0000FF"+.Price+" Cashpoints^000000,";
mes "e também","1x ^0000FF"+ getitemname(990) +"^000000","1x ^0000FF"+ getitemname(7041) +"^000000";
}
mes "Eu vou aplicar uma opção ^FF0000ALEATÓRIA^000000";
mes "no seu equipamento";
next;
mes "[ Neight ]";
mes "Eu esqueci de mencionar que";
mes "há uma chance de ^FF0000"+.FailRate+"%^000000 ";
mes "que o processo ^FF0000FALHE^000000";
mes "e eu perca seu equipamento junto...";
next;
mes "[ Neight ]";
mes "Você gostaria de arriscar";
mes "encantar seu item com uma chance de";
mes "^FF0000"+.FailRate+"%^000000 de ^FF0000Falhe^000000";
mes "e perder seu equipamento?";
next;
if(select("Nem! Tô de boas...:^0000FFEu vou testar minha sorte! Encante meu equipamento!^000000")==1) goto OnCancel;
mes "[ Neight ]";
mes "Esplêndido!";
mes "Este processo levará";
mes "cerca de ^0000FF"+.Wait+"^000000 segundos...";
mes "Não mova um músculo enquanto";
mes "eu encanto seu equipamento";
close2;
if(countitem(990) < 1 && countitem(7041) < 1)
goto PriceFail;
setarray .@eq[1], EQI_HEAD_TOP,EQI_HEAD_MID,EQI_HEAD_LOW,EQI_ARMOR,EQI_HAND_R,EQI_HAND_L,EQI_GARMENT,EQI_SHOES,EQI_ACC_R,EQI_ACC_L;
for(set .@i,1; .@i<getarraysize(.@eq); set .@i,.@i+1){
if(getequipisequiped(.@eq[.@i])){
set .@menu$,.@menu$+F_getpositionname(.@eq[.@i])+" ~ [ " + getequipname(.@eq[.@i]) + " ]";
set .@equipped,1;
} set .@menu$,.@menu$+":";
} set .@part,.@eq[select(.@menu$)];
set .@val,rand(.MinValue,.MaxValue);
IgnoreCheck:
set .@opt,rand(.MinOpt,.MaxOpt);
for(set .@f,1; .@f<getarraysize(.ignore); set .@f,.@f+1)
if(.@opt==.ignore[.@f])
goto IgnoreCheck;
set .@indx,rand(.MaxIndex);
if(!.OverWrite){
if(getequiprandomoption(.@part,4,ROA_ID,getcharid(0))) set .@x4,4;
if(getequiprandomoption(.@part,3,ROA_ID,getcharid(0))) set .@x3,3;
if(getequiprandomoption(.@part,2,ROA_ID,getcharid(0))) set .@x2,2;
if(getequiprandomoption(.@part,1,ROA_ID,getcharid(0))) set .@x1,1;
if(getequiprandomoption(.@part,0,ROA_ID,getcharid(0))) set .@x0,0;
if(.@indx == 0 && .@x0)
if(.@indx==.MaxIndex) goto OnMax;
else set .@indx,1;
if(.@indx == 1 && .@x1)
if(.@indx==.MaxIndex) goto OnMax;
else set .@indx,2;
if(.@indx == 2 && .@x2)
if(.@indx==.MaxIndex) goto OnMax;
else set .@indx,3;
if(.@indx == 3 && .@x3)
if(.@indx==.MaxIndex) goto OnMax;
else set .@indx,4;
if(.@indx == 4 && .@x4)
if(.@indx==.MaxIndex) goto OnMax;
}
if(.@indx == 4 && (!getequiprandomoption(.@part,3,ROA_ID,getcharid(0)))) set .@indx,3;
if(.@indx == 3 && (!getequiprandomoption(.@part,2,ROA_ID,getcharid(0)))) set .@indx,2;
if(.@indx == 2 && (!getequiprandomoption(.@part,1,ROA_ID,getcharid(0)))) set .@indx,1;
if(.@indx == 1 && (!getequiprandomoption(.@part,0,ROA_ID,getcharid(0)))) set .@indx,0;
progressbar "ffff00",.Wait;
if(.Currency){
if(Zeny < .Price)
goto PriceFail;
else
set Zeny,Zeny-.Price;
delitem 990,1;
delitem 7041,1;
} else {
if(#CASHPOINTS < .Price)
goto PriceFail;
else
set #CASHPOINTS,#CASHPOINTS-.Price;
delitem 990,1;
delitem 7041,1;
}
// Failed...
if(.FailRate > 100) set .FailRate,100;
if(rand(100) <= .FailRate) goto OnFailure;
// Success!!
specialeffect2 154;
setrandomoption(.@part,.@indx,.@opt,.@val,.@indx,getcharid(0));
end;
OnMax:
mes "[ Neight ]";
mes "Ops... Seu equipamento ja";
mes "foi encantado ao máximo!";
mes " ";
mes "Perdão, mas, não posso";
mes "adicionar mais encantamentos";
mes "ao seu item.";
close;
OnFailure:
specialeffect2 EF_PHARMACY_FAIL;
mes "[ Neight ]"," ";
mes "Me perdoe..."," ";
mes "^FF0000O processo falhou...";
mes "Seu item foi destruído.^000000";
delequip .@part;
close;
PriceFail:
mes "[ Neight ]";
mes "O que e isso?";
mes "Você está brincando comigo?";
mes "Perdão, mas, eu não trabalho";
mes "de graça!";
mes "Você pode voltar quando";
mes "tiver dinheiro para me pagar";
mes "pelos meus serviços.";
close;
OnCancel:
mes "[ Neight ]";
mes "Vista-se.";
mes "Deixe-me saber caso";
mes "você mude de ideia";
close;
}
Now im looking for an way to optimize and solve the followying errors:
[Error]: buildin_setrandomoption: Random option ID 0 does not exists.
[Error]: buildin_disableitemuse: fatal error ! player not attached! - SOLVED
Edit: When the first error didnt happen, the item is enchanted, but, only with ID 1 and 2(MaxHP or MaxSP).
I dont know if i will get more errors after solve this ones.
Question
Rizta
Well, im looking for a way to give different(and random) options by index slot(0, 1 , 2, 3, 4 = 5 slots) and equipment slot( headgear, weapon, armor etc).
Based on that, found one script that do it but completely random and then i edited to do what i want.
But, once im newbie(or simple noob hehe) its obvious i got erros and lots of doubts.
Here's the full code:
//===== rAthena Script ======================================= //= Random Option SurviveRO //===== By: ================================================== //= Rizakh //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Atribui opcoes aleatorias aos equipamentos. //= com o custo de X zeny/cash //============================================================ prontera,143,182,3 script Piranha Safada 700,{ goto NPC; end; OnInit: //============================== // CONFIGURAÇÕES DE MOEDA // 1 = Zeny // 0 = Cashpoints //============================== set .moeda,1; // Moeda para comprar a opcao aleatoria set .preco,1; // Preco da opcao aleatoria //setarray .irq[0],990,7041; // Red Blood e Fine Grit //setarray .iqt[0],1,1; // Quantidade de cada item //============================== // CONFIGURAÇÕES RANDOM OPTION //============================== set .sobrepor,1; // Permite sobrepor encantamentos existentes ( 0 = off ) set .falha,0; // Define a chance de falha (%) //set .MaxOpt,192; // Maximum item option a player can enchant ( reference: https://github.com/rathena/rathena/blob/master/db/const.txt#L1645-L1836 ) //set .MinOpt,1; // Minimum item option a player can enchant set .valmin,1; // Valor minimo a se tirar na opcao aleatoria set .valmax,5; // Valor maximo a se tirar na opcao aleatoria set .slotmax,4; // Maximo de slots para encantar( padrão = 0-4 ) set .espera,1; // Delay da barra de progresso em segundos //============================ // IDS DAS RANDOM OPTIONS // SEPARADAS POR EQUIPAMENTOS // E SLOT (0 PARA 4 = 5 SLOTS) //============================ // Equip Top Head Possible IDS //============================ setarray .thd0[1], 13, 14, 11, 12, 16, 18, 3, 4, 5, 6, 7, 8, 20, 21, 22, 23, 24, 19; setarray .thd1[1], 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35; setarray .thd2[1],168,169,170,171,172,167; setarray .thd3[1], 3, 4, 5, 6, 7, 8, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54; setarray .thd4[1], 3, 4, 5, 6, 7, 8, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74; //============================= // Equip Mid Head Possible IDS //============================= setarray .mhd0[1], 3, 4, 5, 6, 7, 8; setarray .mhd1[1], 87, 89, 90, 91, 92, 93, 94, 95, 96; setarray .mhd2[1],168,169,170,171,172,167; setarray .mhd3[1], 97, 98, 99,100,101,102, 103,104,105,106,107,108, 109,110,111,112,113,114, 115,116; setarray .mhd4[1], 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24; //============================== // Equipe Low Head Possible IDS //============================== setarray .lhd0[1], 3, 4, 5, 6, 7, 8; setarray .lhd1[1], 11, 12, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24; setarray .lhd2[1],164,165,167,168,168, 18; setarray .lhd3[1], 3, 4, 5, 6, 7, 8, 1, 2, 11, 12, 16; setarray .lhd5[1], 37, 39, 41, 43, 45, 47, 49, 51, 53, 55; //============================== // Equipe Armor Possible IDS //============================== setarray .arm0[1], 76, 77, 78, 79, 80, 81, 82, 83, 84, 85; setarray .arm1[1], 9, 10, 11, 12, 20, 21; setarray .arm2[1], 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,107,108, 109,110,111,112,113,114, 115,116; setarray .arm3[1], 3, 4, 5, 6, 7, 8, 21, 20; setarray .arm5[1],186,167,160,161,162,165; //============================== // Equipe RHand Possible IDS //============================== setarray .rwp0[1],175,176,177,178,179,180, 181,182,183,184; setarray .rwp1[1], 13, 18, 19, 15, 16, 24, 3, 4, 5, 6, 7, 8; setarray .rwp2[1], 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75; setarray .rwp3[1],147,148,151,152,153,154, 155,156,164,158,159,157; setarray .rwp5[1],166,173,174,185,187,188, 189,117,118,119,120,121, 122,123,124,125,126; //============================== // Equipe LHand Possible IDS //============================== setarray .lwp0[1], 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 18, 20, 21, 22, 23, 24; setarray .lwp1[1], 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35; setarray .lwp2[1], 87, 88, 89, 90, 91, 92, 93, 94, 95, 96; setarray .lwp3[1],160,161,162,165,167,190, 191,192; setarray .lwp5[1],149,150,151,152, 11, 12; //============================== // Equipe Garment Possible IDS //============================== setarray .gar0[1], 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24; setarray .gar1[1], 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35; setarray .gar2[1],117,118,119,120,121,122, 123,124,125,126; setarray .gar3[1],127,128,129,130,131,132, 133,134,135,136,137,138, 139,140,141,142,143,144, 145,146,153,154,155,156; setarray .gar5[1],163,165,167,190,191,192; //============================== // Equipe Shoes Possible IDS //============================== setarray .shs0[1], 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24; setarray .shs1[1],187,188,189,157,158,159; setarray .shs2[1],151,152,149,147; setarray .shs3[1],100,101,102,103,104,105, 106,107,108,109,110,111, 112,113,114,115,116; setarray .shs5[1], 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75; //============================== // Equipe RAccessory Possible IDS //============================== setarray .rac0[1], 3, 4, 5, 6, 7, 8; setarray .rac1[1], 1, 2, 9, 10, 11, 12; setarray .rac2[1], 15, 16, 18, 22, 23, 24; setarray .rac3[1], 13, 14, 17, 19,166,163; setarray .rac5[1],168,169,170,171,172,173, 174,117,118,119,120,121, 122,123,124,125,126; //============================== // Equipe LAcessory Possible IDS //============================== setarray .lac0[1], 3, 4, 5, 6, 7, 8; setarray .lac1[1], 1, 2, 9, 10, 11, 12; setarray .lac2[1], 15, 16, 18, 22, 23, 24; setarray .lac3[1], 13, 14, 17, 19,166,163; setarray .lac5[1],168,169,170,171,172,173, 174,117,118,119,120,121, 122,123,124,125,126; //============================== // FIM DAS CONFIGURAÇÕES DE ID // PARA RANDOM Option //============================== end; NPC: disable_items; mes "[ Neight ]"; mes "Olá jovem!"; mes "Eu estou pesquisando uma"; mes "forma de adicionar"; mes "encantamentos ^FF0000aleatórios^000000"; mes "em um equipamento."; next; mes "[ Neight ]"; mes "Eu posso fazer qualquer um dos seus"; mes "equipamentos mais fortes"; mes "do que suas versões atuais..."; next; mes "[ Neight ]"; if(.moeda){ mes "Por um preço de ^0000FF"+.preco+" Zeny^000000,"; mes "e também","1x ^0000FF"+ getitemname(990) +"^000000","1x ^0000FF"+ getitemname(7041) +"^000000"; } else { mes "Por um preço de ^0000FF"+.preco+" Cashpoints^000000,"; mes "e também","1x ^0000FF"+ getitemname(990) +"^000000","1x ^0000FF"+ getitemname(7041) +"^000000"; } mes "Eu vou aplicar uma opção ^FF0000ALEATÓRIA^000000"; mes "no seu equipamento"; next; mes "[ Neight ]"; mes "Eu esqueci de mencionar que"; mes "há uma chance de ^FF0000"+.falha+"%^000000 "; mes "que o processo ^FF0000FALHE^000000"; mes "e eu perca seu equipamento junto..."; next; mes "[ Neight ]"; mes "Você gostaria de arriscar"; mes "encantar seu item com uma chance de"; mes "^FF0000"+.falha+"%^000000 de ^FF0000Falhe^000000"; mes "e perder seu equipamento?"; next; if(select("Nem! Tô de boas...:^0000FFEu vou testar minha sorte! Encante meu equipamento!^000000")==1) goto OnCancel; mes "[ Neight ]"; mes "Esplêndido!"; mes "Este processo levará"; mes "cerca de ^0000FF"+.espera+"^000000 segundos..."; mes "Não mova um músculo enquanto"; mes "eu encanto seu equipamento"; close2; if(countitem(990) < 1 && countitem(7041) < 1) goto PriceFail; setarray .@eq[1], EQI_HEAD_TOP,EQI_HEAD_MID,EQI_HEAD_LOW,EQI_ARMOR,EQI_HAND_R,EQI_HAND_L,EQI_GARMENT,EQI_SHOES,EQI_ACC_R,EQI_ACC_L; for(set .@i,1; .@i<getarraysize(.@eq); set .@i,.@i+1){ if(getequipisequiped(.@eq[.@i])){ set .@menu$,.@menu$+F_getpositionname(.@eq[.@i])+" ~ [ " + getequipname(.@eq[.@i]) + " ]"; set .@equipado,1; } set .@menu$,.@menu$+":"; } set .@part,.@eq[select(.@menu$)]; set .@val, rand(.valmin,.valmax); set .@indx,rand(.slotmax); if(!.sobrepor){ if(getequiprandomoption(.@part,4,ROA_ID,getcharid(0))) set .@x4,4; if(getequiprandomoption(.@part,3,ROA_ID,getcharid(0))) set .@x3,3; if(getequiprandomoption(.@part,2,ROA_ID,getcharid(0))) set .@x2,2; if(getequiprandomoption(.@part,1,ROA_ID,getcharid(0))) set .@x1,1; if(getequiprandomoption(.@part,0,ROA_ID,getcharid(0))) set .@x0,0; if(.@indx == 0 && .@x0) if(.@indx==.slotmax) goto OnMax; else set .@indx,1; if(.@indx == 1 && .@x1) if(.@indx==.slotmax) goto OnMax; else set .@indx,2; if(.@indx == 2 && .@x2) if(.@indx==.slotmax) goto OnMax; else set .@indx,3; if(.@indx == 3 && .@x3) if(.@indx==.slotmax) goto OnMax; else set .@indx,4; if(.@indx == 4 && .@x4) if(.@indx==.slotmax) goto OnMax; } if(.@indx == 4 && (!getequiprandomoption(.@part,3,ROA_ID,getcharid(0)))) set .@indx,3; if(.@indx == 3 && (!getequiprandomoption(.@part,2,ROA_ID,getcharid(0)))) set .@indx,2; if(.@indx == 2 && (!getequiprandomoption(.@part,1,ROA_ID,getcharid(0)))) set .@indx,1; if(.@indx == 1 && (!getequiprandomoption(.@part,0,ROA_ID,getcharid(0)))) set .@indx,0; if(.@part == EQI_HEAD_TOP) goto THead; if(.@part == EQI_HEAD_MID) goto MHead; if(.@part == EQI_HEAD_LOW) goto LHead; if(.@part == EQI_ARMOR) goto Armor; if(.@part == EQI_HAND_R) goto RHand; if(.@part == EQI_HAND_L) goto LHand; if(.@part == EQI_GARMENT) goto Garment; if(.@part == EQI_SHOES) goto Shoes; if(.@part == EQI_ACC_R) goto RAcc; if(.@part == EQI_ACC_L) goto LAcc; THead: if(.@indx == 0) set .@opt,.thd0[rand(1,18)]; if(.@indx == 1) set .@opt,.thd1[rand(1,11)]; if(.@indx == 2) set .@opt,rand(.thd2); if(.@indx == 3) set .@opt,rand(.thd3); if(.@indx == 4) set .@opt,rand(.thd4); MHead: if(.@indx == 0) set .@opt,rand(.mhd0); if(.@indx == 1) set .@opt,rand(.mhd1); if(.@indx == 2) set .@opt,rand(.mhd2); if(.@indx == 3) set .@opt,rand(.mhd3); if(.@indx == 4) set .@opt,rand(.mhd4); LHead: if(.@indx == 0) set .@opt,rand(.lhd0); if(.@indx == 1) set .@opt,rand(.lhd1); if(.@indx == 2) set .@opt,rand(.lhd2); if(.@indx == 3) set .@opt,rand(.lhd3); if(.@indx == 4) set .@opt,rand(.lhd4); Armor: if(.@indx == 0) set .@opt,rand(.arm0); if(.@indx == 1) set .@opt,rand(.arm1); if(.@indx == 2) set .@opt,rand(.arm2); if(.@indx == 3) set .@opt,rand(.arm3); if(.@indx == 4) set .@opt,rand(.arm4); RHand: if(.@indx == 0) set .@opt,rand(.rwp0); if(.@indx == 1) set .@opt,rand(.rwp1); if(.@indx == 2) set .@opt,rand(.rwp2); if(.@indx == 3) set .@opt,rand(.rwp3); if(.@indx == 4) set .@opt,rand(.rwp4); LHand: if(.@indx == 0) set .@opt,rand(.lwp0); if(.@indx == 1) set .@opt,rand(.lwp1); if(.@indx == 2) set .@opt,rand(.lwp2); if(.@indx == 3) set .@opt,rand(.lwp3); if(.@indx == 4) set .@opt,rand(.lwp4); Garment: if(.@indx == 0) set .@opt,rand(.gar0); if(.@indx == 1) set .@opt,rand(.gar1); if(.@indx == 2) set .@opt,rand(.gar2); if(.@indx == 3) set .@opt,rand(.gar3); if(.@indx == 4) set .@opt,rand(.gar4); Shoes: if(.@indx == 0) set .@opt,rand(.shs0); if(.@indx == 1) set .@opt,rand(.shs1); if(.@indx == 2) set .@opt,rand(.shs2); if(.@indx == 3) set .@opt,rand(.shs3); if(.@indx == 4) set .@opt,rand(.shs4); RAcc: if(.@indx == 0) set .@opt,rand(.rac0); if(.@indx == 1) set .@opt,rand(.rac1); if(.@indx == 2) set .@opt,rand(.rac2); if(.@indx == 3) set .@opt,rand(.rac3); if(.@indx == 4) set .@opt,rand(.rac4); LAcc: if(.@indx == 0) set .@opt,rand(.lac0); if(.@indx == 1) set .@opt,rand(.lac1); if(.@indx == 2) set .@opt,rand(.lac2); if(.@indx == 3) set .@opt,rand(.lac3); if(.@indx == 4) set .@opt,rand(.lac4); progressbar "ffff00",.espera; if(.moeda){ if(Zeny < .preco) goto PriceFail; else set Zeny,Zeny-.preco; delitem 990,1; delitem 7041,1; } else { if(#CASHPOINTS < .preco) goto PriceFail; else set #CASHPOINTS,#CASHPOINTS-.preco; delitem 990,1; delitem 7041,1; } // Falha... if(.falha > 100) set .falha,100; if(rand(100) <= .falha) goto OnFailure; // Sucesso!! specialeffect2 154; setrandomoption(.@part,.@indx,.@opt,.@val,.@indx,getcharid(0)); end; OnMax: mes "[ Neight ]"; mes "Ops... Seu equipamento ja"; mes "foi encantado ao máximo!"; mes " "; mes "Perdão, mas, não posso"; mes "adicionar mais encantamentos"; mes "ao seu item."; close; OnFailure: specialeffect2 EF_PHARMACY_FAIL; mes "[ Neight ]"," "; mes "Me perdoe..."," "; mes "^FF0000O processo falhou..."; mes "Seu item foi destruído.^000000"; delequip .@part; close; PriceFail: mes "[ Neight ]"; mes "O que e isso?"; mes "Você está brincando comigo?"; mes "Perdão, mas, eu não trabalho"; mes "de graça!"; mes "Você pode voltar quando"; mes "tiver dinheiro para me pagar"; mes "pelos meus serviços."; close; OnCancel: mes "[ Neight ]"; mes "Vista-se."; mes "Deixe-me saber caso"; mes "você mude de ideia"; close; }
I really want to give credits for the person that created this script, used by me to create this one above, but, im really dont know who did it (if you are the owner or know him, pls contact me)
Original:
celestiaj,63,82,3 script Neight 700,{ goto NPC; end; OnInit: //============================== // CURRENCY SETTING // 1 = Zeny // 0 = Cashpoints //============================== set .Currency,1; // Currency to buy random option set .Price,10000; // Prize of random option setarray .irq[0],990,7041; // Red Blood e Fine Grit setarray .iqt[0],1,1; // Quantidade de cada item //============================== // RANDOM OPTION SETTING //============================== set .OverWrite,1; // Allows overwriting the already existing option enchantment ( 0 to disable ) set .FailRate,40; // Sets fail chance set .MaxOpt,192; // Maximum item option a player can enchant ( reference: https://github.com/rathena/rathena/blob/master/db/const.txt#L1645-L1836 ) set .MinOpt,1; // Minimum item option a player can enchant set .MinValue,1; // Minimum option effect value set .MaxValue,10; // Maximum option effect value set .MaxIndex,4; // Maximum option slots ( default is 0 to 4 ) set .Wait,1; // Progress bar delay in seconds // Random option that will not be applied setarray .ignore[0], 86, // RDMOPT_BODY_ATTR_ALL end; NPC: disable_items; mes "[ Neight ]"; mes "Olá jovem!"; mes "Eu estou pesquisando uma"; mes "forma de adicionar"; mes "encantamentos ^FF0000aleatórios^000000"; mes "em um equipamento."; next; mes "[ Neight ]"; mes "Eu posso fazer qualquer um dos seus"; mes "equipamentos mais fortes"; mes "do que suas versões atuais..."; next; mes "[ Neight ]"; if(.Currency){ mes "Por um preço de ^0000FF"+.Price+" Zeny^000000,"; mes "e também","1x ^0000FF"+ getitemname(990) +"^000000","1x ^0000FF"+ getitemname(7041) +"^000000"; } else { mes "Por um preço de ^0000FF"+.Price+" Cashpoints^000000,"; mes "e também","1x ^0000FF"+ getitemname(990) +"^000000","1x ^0000FF"+ getitemname(7041) +"^000000"; } mes "Eu vou aplicar uma opção ^FF0000ALEATÓRIA^000000"; mes "no seu equipamento"; next; mes "[ Neight ]"; mes "Eu esqueci de mencionar que"; mes "há uma chance de ^FF0000"+.FailRate+"%^000000 "; mes "que o processo ^FF0000FALHE^000000"; mes "e eu perca seu equipamento junto..."; next; mes "[ Neight ]"; mes "Você gostaria de arriscar"; mes "encantar seu item com uma chance de"; mes "^FF0000"+.FailRate+"%^000000 de ^FF0000Falhe^000000"; mes "e perder seu equipamento?"; next; if(select("Nem! Tô de boas...:^0000FFEu vou testar minha sorte! Encante meu equipamento!^000000")==1) goto OnCancel; mes "[ Neight ]"; mes "Esplêndido!"; mes "Este processo levará"; mes "cerca de ^0000FF"+.Wait+"^000000 segundos..."; mes "Não mova um músculo enquanto"; mes "eu encanto seu equipamento"; close2; if(countitem(990) < 1 && countitem(7041) < 1) goto PriceFail; setarray .@eq[1], EQI_HEAD_TOP,EQI_HEAD_MID,EQI_HEAD_LOW,EQI_ARMOR,EQI_HAND_R,EQI_HAND_L,EQI_GARMENT,EQI_SHOES,EQI_ACC_R,EQI_ACC_L; for(set .@i,1; .@i<getarraysize(.@eq); set .@i,.@i+1){ if(getequipisequiped(.@eq[.@i])){ set .@menu$,.@menu$+F_getpositionname(.@eq[.@i])+" ~ [ " + getequipname(.@eq[.@i]) + " ]"; set .@equipped,1; } set .@menu$,.@menu$+":"; } set .@part,.@eq[select(.@menu$)]; set .@val,rand(.MinValue,.MaxValue); IgnoreCheck: set .@opt,rand(.MinOpt,.MaxOpt); for(set .@f,1; .@f<getarraysize(.ignore); set .@f,.@f+1) if(.@opt==.ignore[.@f]) goto IgnoreCheck; set .@indx,rand(.MaxIndex); if(!.OverWrite){ if(getequiprandomoption(.@part,4,ROA_ID,getcharid(0))) set .@x4,4; if(getequiprandomoption(.@part,3,ROA_ID,getcharid(0))) set .@x3,3; if(getequiprandomoption(.@part,2,ROA_ID,getcharid(0))) set .@x2,2; if(getequiprandomoption(.@part,1,ROA_ID,getcharid(0))) set .@x1,1; if(getequiprandomoption(.@part,0,ROA_ID,getcharid(0))) set .@x0,0; if(.@indx == 0 && .@x0) if(.@indx==.MaxIndex) goto OnMax; else set .@indx,1; if(.@indx == 1 && .@x1) if(.@indx==.MaxIndex) goto OnMax; else set .@indx,2; if(.@indx == 2 && .@x2) if(.@indx==.MaxIndex) goto OnMax; else set .@indx,3; if(.@indx == 3 && .@x3) if(.@indx==.MaxIndex) goto OnMax; else set .@indx,4; if(.@indx == 4 && .@x4) if(.@indx==.MaxIndex) goto OnMax; } if(.@indx == 4 && (!getequiprandomoption(.@part,3,ROA_ID,getcharid(0)))) set .@indx,3; if(.@indx == 3 && (!getequiprandomoption(.@part,2,ROA_ID,getcharid(0)))) set .@indx,2; if(.@indx == 2 && (!getequiprandomoption(.@part,1,ROA_ID,getcharid(0)))) set .@indx,1; if(.@indx == 1 && (!getequiprandomoption(.@part,0,ROA_ID,getcharid(0)))) set .@indx,0; progressbar "ffff00",.Wait; if(.Currency){ if(Zeny < .Price) goto PriceFail; else set Zeny,Zeny-.Price; delitem 990,1; delitem 7041,1; } else { if(#CASHPOINTS < .Price) goto PriceFail; else set #CASHPOINTS,#CASHPOINTS-.Price; delitem 990,1; delitem 7041,1; } // Failed... if(.FailRate > 100) set .FailRate,100; if(rand(100) <= .FailRate) goto OnFailure; // Success!! specialeffect2 154; setrandomoption(.@part,.@indx,.@opt,.@val,.@indx,getcharid(0)); end; OnMax: mes "[ Neight ]"; mes "Ops... Seu equipamento ja"; mes "foi encantado ao máximo!"; mes " "; mes "Perdão, mas, não posso"; mes "adicionar mais encantamentos"; mes "ao seu item."; close; OnFailure: specialeffect2 EF_PHARMACY_FAIL; mes "[ Neight ]"," "; mes "Me perdoe..."," "; mes "^FF0000O processo falhou..."; mes "Seu item foi destruído.^000000"; delequip .@part; close; PriceFail: mes "[ Neight ]"; mes "O que e isso?"; mes "Você está brincando comigo?"; mes "Perdão, mas, eu não trabalho"; mes "de graça!"; mes "Você pode voltar quando"; mes "tiver dinheiro para me pagar"; mes "pelos meus serviços."; close; OnCancel: mes "[ Neight ]"; mes "Vista-se."; mes "Deixe-me saber caso"; mes "você mude de ideia"; close; }
Now im looking for an way to optimize and solve the followying errors:
[Error]: buildin_setrandomoption: Random option ID 0 does not exists. [Error]: buildin_disableitemuse: fatal error ! player not attached! - SOLVED Edit: When the first error didnt happen, the item is enchanted, but, only with ID 1 and 2(MaxHP or MaxSP).
I dont know if i will get more errors after solve this ones.
Edited by RiztaThx for all that read this topic!
Solved the second buildin error
Link to comment
Share on other sites
9 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.