Jump to content

SpiritD

Members
  • Posts

    75
  • Joined

  • Last visited

Everything posted by SpiritD

  1. I can do this -- give me a little time (at work right now) /edit/ Okay so I realize now you need to make your own custom item "box". For example, player will buy the 10 count berry box for 2 TCG, open the box and get 10 berry. I'll give you my shop code but it's nothing special... you will need to create your own item ID for the box and put it into this script. MAP,X,Y,Z script YGG Trader#spiritD SPRITE,{ mes "[YGG Trader]"; mes "Would you like to buy some"; mes "yggdrasil items?"; if (countitem(7227) < 1) { mes "I only accept TCG Card as payment."; mes "Please come back when you have TCG Cards."; close; } switch(select("No:Yes")){ case 1: close; case 2: callshop "YGG_SHOP",1; end; } } - itemshop YGG_SHOP -1,7227,<itemid>:<price>,<itemid>:<price>
  2. Hey that might work temporarily but what I want to do is: When you pick up an item it's just that one item. I want to change it so when you pick up an item, it picks up all the items in a 3x3 radius (just like greed but automatically). The @command will be so you can turn it on or off.
  3. Can you post a little more information? Post the script you are using, any error message, etc.
  4. source: https://github.com/rathena/rathena/blob/master/doc/script_commands.txt
  5. ~Bump ( @Cyro Apparently I've been warned for this post. What more information am I supposed to provide?)
  6. I may be mistaken but you mean your character stats and equipment? That's ALT+Q. Furthermore, I don't even see ALT+A on the shortcut window.
  7. Change switch(basejob) to switch(Class) *Note: I think it's case sensitive so you might have to change the other variables near the bottom of the script. Refer to the pre-defined character variables here:
  8. Hey, after doing a quick search I found some code for an @arealoot command but it doesn't work with recent versions apparently. Does anyone have an updated or known working arealoot feature?
  9. If you are using a patcher, sometimes the anti-virus software will interfere. If any files are being deleted, disable the anti-virus or create an exception.
  10. Not surprising considering the OP is 6 years old...
  11. I read all of them... this is fantastic
  12. Thank you. I have fixed the NPC error but there must be another error in the logic somewhere. When I choose "solo" (or any other option) the map-server crashes. What gives? (ps- I went ahead and defined the instance in the instance_db.txt)
  13. Hye guys, can someone tell me what's wrong with this script? The person who wrote it hasn't replied in a couple of days. //instance entrance prontera,153,31,2 script Knight Tord#prtfild08Tord 418,{ mes "[ Knight Tord ]"; mes "Operations are going smoothly."; switch(select("Thank you, sir.:Sir, may I join the operation?")){ case 1: close; case 2: next; mes "[ Knight Tord ]"; mes "==================="; mes "Level 10-15 - South Prontera."; mes "==================="; mes "Are you sure?"; switch(select("Not sure.:Yes, I am ready!")){ case 1: close; case 2: .@isntname$ = "prt_fild08"; switch(select("Solo:Party:Guild")){ case 1: .@mode$ = "IM_CHAR"; break; case 2: .@mode$ = "IM_PARTY"; break; case 3: .@mode$ = "IM_GUILD"; break; } switch(instance_create(.@isntname$, .@mode$)) { case -1: mes "^FF0000-1 Invalid Type^000000."; case -2: mes "^FF0000-2 Char/Party/Guild not exist^000000."; case -3: instance_enter(.@isntname$); close; case -4: mes "^FF0000-4 No Free Instances. MAX_INSTANCE?!^000000."; default: break; } switch(instance_enter(.@isntname$)){ case 3: mes "An unknown error has occurred."; debugmes strcharinfo(0) + " / " + instance_id() + " / FAIL CODE 3"; close; case 2: mes "Instance for " + .@isntname$ + " does not exist."; mes "Instance has been destroyed by the Party Leader, or because of the time limit."; debugmes strcharinfo(0) + " / " + instance_id() + " / FAIL CODE 2"; close; case 1: mes "Looking for a party on a single char only instance.."; debugmes strcharinfo(0) + " / " + instance_id() + " / FAIL CODE 1"; close; case 0: end; } } } } //monster spawn function script monster_spawn { switch(getarg(0)){ case 1: instance_announce instance_id(),"50 Monsters spawned. Defeat them all to proceed.",0; monster instance_mapname("prt_fild08"),169,366,"Poring",3000,1,instance_npcname("monster_death")+"::OnMobKill"; monster instance_mapname("prt_fild08"),171,365,"Poring",3000,1,instance_npcname("monster_death")+"::OnMobKill"; viewpoint 1,169,366,1,0xFFA7CB; viewpoint 1,171,365,1,0xFFA7CB; break; case 2: instance_announce instance_id(),"All 50 monsters killed! [Mastering] appeared!",0; viewpoint 1,171,365,1,0xFF1B78; monster instance_mapname("prt_fild08"),175,363,"Mastering [Boss]",1090,1,instance_npcname("monster_death")+"::OnBossKill"; break; } end; } //instance prt_fild08,172,373,2 script Knight Tord#prtfld08Tord1 418,{ if('start > 1) end; mes "start?"; menu "Yes",-; close2; 'start = 1; //instance variable monster_spawn('start); end; } prt_fild08,1,1,-1 script monster_death -1,{ OnMobKill: if(mobcount(instance_mapname("prt_fild08")) < 1){ //counts how many mobs are left, if 0 mobs remain, moves to next round 'start++; monster_spawn('start); end; } OnBossKill: instance_announce instance_id(),"Cogratulations",0; getitem 501,1; instance_destroy(instance_id()); end; } https://pastebin.com/SR5fR8f2 When you chcoose "solo" or any other options the map server will crash. Does this have to be added to instance_db as well?
  14. https://www.mathsisfun.com/percentage.html The script is saying if "winning Number" is greater than or equal to zero AND less than or equal to 4 (meaning 0-4) then you win a prize. Because there are 100 different numbers that are picked randomly, therefore your chances to get numbers 0-4 is 5%
  15. yes that is correct. If you want to create a list of items with quantities as well as the percentage they should be rewarded, I can configure the logic for you.
  16. im sure there is a cleaner way to do this but this should work: .@winNum = rand(99); //100 if (.@winNum >= 0 && .@winNum <= 4) { getitem <PRIZE_ID>,1; } //5% chance if (.@winNum >= 5 && .@winNum <= 9) { getitem <PRIZE_ID>,1; } //5% chance if (.@winNum >= 10 && .@winNum <= 19) { getitem <PRIZE_ID>,1; } //10% chance if (.@winNum >= 20 && .@winNum <= 29) { getitem <PRIZE_ID>,1; } //10% chance if (.@winNum >= 30 && .@winNum <= 49) { getitem <PRIZE_ID>,1; } //20% chance if (.@winNum >= 50 && .@winNum <= 99) { getitem <PRIZE_ID>,1; } //50% chance else { debugmes "[GamblerNPC] "+strcharinfo(0)+" is a hacker!!"; } Do you understand this example?
  17. I'm by no means an expert but it shouldn't be doing that... if the map is on @pvp like it shows the numbers and stuff then your PK_mode should not interfere. Do you have your PVP mapflag set up correctly?
  18. you have it correct but there is one more thing to edit .@winNum = rand(4); //5 prizes to choose from (0-4) make sure the number is ONE LESS than the max amount of prizes so if you have 8 prizes the number inside the rand(#) will be 7 (because zero counts as one!) the percent would involve some tricky math but it's possible... like you want prize#1 to be rare, prize#2 to be uncommon, and all the rest be common? I could do that but you would have to set up all your prizes and what percent you want them (and they should add up to be 100% otherwise im gonna dunk you )
  19. MAP,X,Y,Z script GamblerNPC::spiritD 400,{ if(#CASHPOINTS == 0){ mes "You don't have enough points"; close; } if(#CASHPOINTS > 0){ mes "You have "+#CASHPOINTS+" cash points."; mes "One roll costs 1 cash point."; mes "Would you like to roll?"; switch(select("No thanks:Yes please")){ case 1: close; case 2: #CASHPOINTS--; //subtract CASHPOINTS by 1 .@winNum = rand(4); //5 prizes to choose from (0-4) if(.@winNum == 0){ getitem <PRIZE_ID>,1; } if(.@winNum == 1){ getitem <PRIZE_ID>,1; } if(.@winNum == 2){ getitem <PRIZE_ID>,1; } if(.@winNum == 3){ getitem <PRIZE_ID>,1; } if(.@winNum == 4){ getitem <PRIZE_ID>,1; } else { debugmes "[GamblerNPC] "+strcharinfo(0)+" is a hacker!!"; } mes "Congrats!"; close; } } } Fill in your own NPC coordinates and prizes
  20. I can do this but: What is the point? what should I take away from the player to give them a try?
  21. I tried this but I don't know how to do this part: What I can do is make a script where the player gets "points" (in form of a variable) for turning in items but because I am not the best at scripting yet, you, as the admin, will have to manually look through each players points when the event is over - I don't know how to make a dynamic ladder
  22. I think I did it right .. though I don't have a lot of experience with timers yet. Basically I just attacked the GMstart and GMstop instructions with a cooldown variable and made a 2 hour timer outside the event to control it All customizations are labeled with ' //*EDIT: ' - script Bombring -1,{ OnInit: set .eventstarted, 0; set $bombring_reward,100; bindatcmd "enablebombring","Bombring::OnGMStart"; bindatcmd "disablebombring","Bombring::OnGMStop"; hideonnpc "The Baaam#qz"; hideonnpc "Evento BombRing#prt"; end; OnGMStart: if (getgroupid() < 99){ dispbottom "You are not eligible for this command.", RED; end; } if (.eventCooldown == 1) {//*EDIT: dispbottom "You cannot start the event so soon.", RED; //*EDIT: end; //*EDIT: } //*EDIT: set .eventstarted, 0; OnEventStart: initnpctimer; hideoffnpc "Evento BombRing#prt"; set .x, 5; OnTimer0000: if (.eventstarted == 1) end; announce "[BombRing]: O evento BombRing começou, vá em prontera para entrar!",bc_all; sleep2 5000; announce "[BombRing]: "+.x+" minutos para começar!",bc_all; set .x, .x - 1; end; OnTimer60000: OnTimer120000: OnTimer180000: OnTimer240000: if (.eventstarted == 1) end; announce "[BombRing]: "+.x+" minutos para o evento começar!",bc_all; set .x, .x - 1; end; OnTimer290000: if (.eventstarted == 1) end; announce "[BombRing]: 10 segundos para começar!",bc_all; end; OnTimer300000: if (.eventstarted == 1) end; set .totalplayers, getmapusers ("quiz_02"); announce "[The Baaam]: "+.totalplayers+" jogadores entraram no evento!",bc_all; announce "[The Baaam]: O evento começou!!",bc_all; hideonnpc "The Baaam#prt"; stopnpctimer; callsub OnEventStart1; end; OnEventStart1: set .totalplayers, getmapusers ("quiz_02"); mapannounce "quiz_02","[BombRing]: Ok, escutem, é assim que funciona.",bc_all; sleep 2000; mapannounce "quiz_02","[BombRing]: Bombrings correrão desenfreados nesta área.",bc_all; sleep 2000; mapannounce "quiz_02","[BombRing]: e todos eles vão...BOOOOOOM!",bc_all; sleep 2000; mapannounce "quiz_02","[BombRing]: tudo o que você tem que fazer é ficar vivo :P",bc_all; sleep 2000; mapannounce "quiz_02","[BombRing]: Isso acontecerá por 30 segundos, em um total de 5 rounds.",bc_all; sleep 2000; mapannounce "quiz_02","[BombRing]: Entãoooo, prontos ou não ai vem eles!!!", bc_all; for (set .round,1;.round <= 5;set .round, .round + 1) { set .totalplayers, getmapusers ("quiz_02"); callsub OnBombringSummon; sleep 10000; } if (.round > 5 && getmapusers("quiz_02") > 0){ hideoffnpc "The Baaam#qz"; mapannounce "quiz_02","[BombRing]: Wooooow! Isso é raro! jogadores ganharam! :D",bc_all; } end; OnBombringSummon: mapannounce "quiz_02","[BombRing]: Round "+.round+"!!",bc_all; set .eventstarted, 1; initnpctimer; while (.eventstarted == 1) { if ( (3 * .totalplayers) <= 60) areamonster "quiz_02",48,334,71,357,"Corra por sua vida!",1904,3 * .totalplayers; else areamonster "quiz_02",48,334,71,357,"Corra por sua vida!",1904,60; if(.round == 1) { sleep 4000; } else if (.round == 2) { sleep 3000; } else if (.round == 3) { sleep 2000; } else if (.round == 4) { sleep 1500; } else if (.round == 5) { sleep 1000; } } if (.eventstarted == 1) mapannounce "quiz_02","[BombRing]: Round "+.round+" acabou!!",bc_all; if (.round < 5) mapannounce "quiz_02","[BombRing]: proximo round em 10 segundos.",bc_all; return; OnTimer31000: if (.eventstarted == 0) end; else set .eventstarted, 0; killmonsterall "quiz_02"; cleanmap "quiz_02"; stopnpctimer; end; OnPCDieEvent: if (strcharinfo(3) == "quiz_02") { mapannounce "quiz_02","[BombRing]: "+strcharinfo(0)+" foi explodido!!",bc_all; dispbottom "Você recebeu 1x [Ticket de Recompensa] por participar do evento."; getitem 100,1; warp "savepoint",0,0; if (getmapusers("quiz_02") <= 1) { stopnpctimer; set .eventstarted, 0; set .round, 6; killmonsterall "quiz_02"; cleanmap "quiz_02"; hideoffnpc "The Baaam#qz"; mapannounce "quiz_02","[The Baaam]: Temos um vencedor!!",bc_all; } } end; OnGMStop: set .eventstarted, 0; set .round, 6; killmonsterall "quiz_02"; cleanmap "quiz_02"; hideoffnpc "The Baaam#qz"; initnpctimer; //*EDIT: start the cooldown timer .eventCooldown = 1; //*EDIT turn on cooldown message end; OnTimer720000: //*EDIT: 2 hours stopnpctimer; //*EDIT: stop timer .eventCooldown = 0; //*EDIT turn off cooldown message } quiz_02,59,345,5 script The Baaam#qz 1904,{ mes "[^666699"+strnpcinfo(1)+"^000000]"; mes "Mandou bem! Você é muito bom nisso!"; next; mes "[^666699"+strnpcinfo(1)+"^000000]"; mes "Você recebeu ^ff990010x [<ITEM>Moedas de Ouro<INFO>671</INFO></ITEM>]^000000 e ^ff99005x [<ITEM>Ticket's de Recompensa<INFO>100</INFO></ITEM>]^000000"; getitem 671,10; getitem $bombring_reward,5; next; mes "[^666699"+strnpcinfo(1)+"^000000]"; mes "Agora saia antes que você acabe explodindo!"; next; atcommand "@go 0"; end; } prontera,142,167,5 script Evento BombRing#prt 879,{ mes "[^666699The Baaam^000000]"; mes "Olá!! gostaria de participar do evento Bombring?"; Switch(Select("Sim!:Que evento é esse?:Não...")) { case 1: mes "[^666699The Baaam^000000]"; mes "Muito bem! esteja pronto!"; next; warp "quiz_02",59,345; break; case 2: mes "[^666699The Baaam^000000]"; mes "Bem, tudo o que você tem que fazer é ficar vivo..."; mes "Isto é, esquivando das explosões dos ^00FF00Bombrings^000000!"; next; mes "[^666699The Baaam^000000]"; mes "Se você ganhar:"; mes "^ff990010x [<ITEM>Moedas de Ouro<INFO>671</INFO></ITEM>]^000000"; mes "^ff99005x [<ITEM>Ticket's de Recompensa<INFO>100</INFO></ITEM>]^000000"; close; break; case 3: mes "[^666699The Baaam^000000]"; mes "Tudo bem, volte se mudar de idéia!"; close; break; } end; OnInit: hideonnpc "Evento BombRing#prt"; }
  23. find pvpPoints++; and change it to pvpPoints+2; im not sure how to fix the npc bug, better to let @Kaze know about it
  24. Thank you, Kaze. I knew someone with more experience than me would clean this up. I am just a beginner myself so I've been taking as many simple requests as I can... I guess this one wasn't as simple as I thought. You really lost me with the logic inside OnInit: - I see the loop that goes through the map list array but I don't understand how you used it for if( getd( "." + strcharinfo(3) ) == 1 ) {
×
×
  • Create New...