Jump to content

Yuka

Members
  • Posts

    333
  • Joined

  • Last visited

Everything posted by Yuka

  1. #1054 - Unknown column 'var1' in 'field list' Sorry, I'm quite not familiar with SQL syntax. Can you really declare variables with just "x = .."?
  2. That only gives me all players with a PvPKDA1 over 50, but I want all with PvPKillsNew over 50 and then descending in their PvPKDA1 order. D: Anyway, thanks for that for now, I think it is pretty close. Example: Player1 50-3 Player2 20-1 Player3 100-70 Player4 56-50 Then the order will be: Player1 Player3 Player4 And Player2 won't appear since he has <50 kills (even though has the best KDR!)
  3. This probably belongs into Third Party Support, I've read the read note too late, sorry. :/ So for now I have this: query_sql "SELECT `char`.char_id,`char`.`name`,global_reg_value.`value` FROM global_reg_value LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id WHERE global_reg_value.str='PvPKDA1' ORDER BY CAST(`global_reg_value`.`value` AS UNSIGNED) DESC LIMIT 50", .@char_idpvp, .@namepvp$, .@countpvp; To get my PvP Ladder sorted by PvPKDA1, now every player also has an entry called PvPKills. And I want to get the Top 50 ordered by PvPKDA1, but only those who have over 50 Kills. So something like WHERE global_reg_value.str='PvPKDA1' and PvPKills > 50 I guess it's something like: WHERE global_reg_value.str='PvPKDA1' and (SELECT global_reg_value.`value` FROM global_reg_value WHERE global_reg_value.str='PvPKills') > 50 But I somehow need to add that it should just select the one I am referring at the moment.. D:
  4. Hello, I am working on a PvP Arena with an area for spectating. But for this I need to make a specific area on the map nopvp. setcell "prontera",100,100,150,150,cell_basilica,1; setcell "prontera",100,100,150,150,cell_landprotector,1; This crashes my server when I pvp at the same map and move in/out the area. If this isn't possible by setcell, is there some sc effect that cannot be canceled by the players and prevents them from attacking/ using skills? Would be pretty cool if there was a way to do it!
  5. This crashes my server.. lhz_in03,260,260,4 script FightC 93,{ OnInit: bindatcmd "joinfc",strnpcinfo(3)+"::OnAtcommand"; setarray .participants$[0],""; setcell "lhz_in03",260,260,265,265,cell_basilica,1; setcell "lhz_in03",260,260,265,265,cell_landprotector,1; end; L_init: mapannounce "lhz_in03","The Fight Club is open! It will close in 2 minutes.",0; end; L_start: mapannounce "lhz_in03","The Fight Club has started.",0; end; L_end: end; OnTimer60000: mapannounce "lhz_in03","The Fight Club will start in 1 minute.",0; end; OnTimer120000: goto L_start; end; OnAtcommand: L_joinFC: for (set .@i, 0; .@i < getarraysize (.participants$); set .@i, .@i + 1){ if (.participants$[.@i] == strcharinfo(0)){ dispbottom "You have already registered for the Fight Club."; end; } } set .participants$[getarraysize(.participants$)], strcharinfo(0); dispbottom "You have registered for the Fight Club."; end; }
  6. Hello, is it possible to trigger a script every time a user casts a skill? Or is it even possible to edit skill delays for specific maps only? I want to have a PvP room that has custom skill delay settings. Is there any way to do it?
  7. Yuka

    Enable RCX?

    Had to add an empty patch2.txt in my ragnarok folder. Maybe this helps someone in the future.
  8. It seems this only works for online characters. I need it to work for the entire character database. Any easy fix for this? You can use my script for this. It will reset a player's stats on login. (only once every time you reset) Can you please add the full code I should be using in your next reply, cause im confused if (getgmlevel() >= 99){ mes "Do you want to reset Stats for everyone?"; if(select("Yes:No") == 1){ goto L_reset; close; end; } } OnInterIfInitOnce: set $statreset, 0; end; OnPCLoginEvent: if (statreset != $statreset){ dispbottom "Your stats have been resetted."; resetstatus; set statreset, $statreset; } end; L_reset: set $statreset, statreset+1; dispbottom "Everyone's Stats have been resetted."; end;
  9. Oh, sorry. Try replacing warp SavePoint; with warp "SavePoint",0,0;
  10. There is an english version a bit lower, this guide is linked in the topic you have sent me. It looks like this in my CP: http://mastelaro.ro-vps.com/ceres/ But there is no information for the users when they voted the last time/ if they can vote again.
  11. Pretty much the job changer.. Place the job ids for the jobs you want to have at the array .@jobs. - script ItemScript -1,{ setarray .@jobs, 4001,4002; //add your job ids here set .@menu$,""; for (set .@i, 0; .@i < getarraysize(.@jobs); set .@i,.@i +1){ set .@menu$, .@menu$+jobname(.@jobs[.@i]); } jobchange .@jobs[select(.@menu$)]; end; }
  12. I am using this: http://www.eathena.ws/board/release-Vote-4-Coins-V-107-t195150.html But it doesn't tell players if they can vote again.
  13. - script WoEKillMessage -1,{ OnPCKillEvent: if((AgitCheck() && CallSub(IsWoE1Map, StrCharInfo(3))) || (AgitCheck2() && CallSub(IsWoE2Map, StrCharInfo(3)))) { DispBottom("You killed " + RID2Name(killedrid) + "."); if(AttachRID(killedrid)) DispBottom("You were killed by " + RID2Name(killerrid) + "."); } End(); IsWoE1Map: for(Set(.@i, GetArraySize(.WoE1Maps$) - 1); .@i >= 0; Set(.@i, .@i - 1)) if(.WoE1Maps$[.@i] == GetArg(0)) return 1; return 0; IsWoE2Map: for(Set(.@i, GetArraySize(.WoE2Maps$) - 1); .@i >= 0; Set(.@i, .@i - 1)) if(.WoE2Maps$[.@i] == GetArg(0)) return 1; return 0; OnInit: SetArray(.WoE1Maps$[0], "aldeg_cas01", "aldeg_cas02", "aldeg_cas03", "aldeg_cas04", "aldeg_cas05" , "gefg_cas01", "gefg_cas02", "gefg_cas03", "gefg_cas04", "gefg_cas05" , "payg_cas01", "payg_cas02", "payg_cas03", "payg_cas04", "payg_cas05" , "prtg_cas01", "prtg_cas02", "prtg_cas03", "prtg_cas04", "prtg_cas05"); SetArray(.WoE2Maps$[0], "arug_cas01", "arug_cas02", "arug_cas03", "arug_cas04", "arug_cas05" , "schg_cas01", "schg_cas02", "schg_cas03", "schg_cas04", "schg_cas05"); End(); }
  14. Yuka

    Enable RCX?

    Oh sorry.. Should've posted it in Third Tool section probably. Well it's a well known tool for Ragnarok, thought some people here could help me out.
  15. Change the first line to your NPC setting. Change the .npcname$ at the OnInit Label to your NPC's name. mapname,x,y,direct script NPCName spriteid,{ mes .npcname$; mes "Hello ^ff0000"+strcharinfo(0)+"^000000,"; mes "I can refine your equipment for a ^ff0000100% chance^000000!"; mes "All I need is ^ff00001 God Anvil^000000."; for( set .@i,1; .@i <= 10; set .@i,.@i+1 ) { if( getequipisequiped(.@i) ) set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]"; set .@menu$, .@menu$ + ":"; } set .@part,select(.@menu$); if(!getequipisequiped(.@part)) { next; mes .npcname$; mes "You're not wearing"; mes "anything there that"; mes "I can refine."; emotion 6; close; } //Check if the item is refinable... if(!getequipisenableref(.@part)) { next; mes .npcname$; mes "I don't think I can"; mes "refine this item at all..."; close; } //Check to see if the items is already +10 if(getequiprefinerycnt(.@part) >= 10) { next; mes .npcname$; mes "I can't refine this"; mes "any more. This is as"; mes "refined as it gets!"; close; } next; mes .npcname$; mes "Do you really want me to refine that item?"; if(select("Yes:No") == 2){ mes "Okay, see you."; close; } if (countitem(7806) < 1){ mes "^ff0000You don't have a God Anvil!^000000"; close; } delitem 7806,1; successrefitem .@part; mes "There you go!"; close; end; OnInit: set .npcname$,"[NPCNAME]"; //Enter NPC Name here end; } Same with this script. Have in mind to secure that the players cannot enter the map themselves. And you might want to add that they cannot /memo there or call their partners/ babys. Just google for rAthena mapflags, I'm sure you can do it yourself! mapname,x,y,direct script NPCName spriteid,{ mes "NPCName"; mes "That was a good War of Emperium!"; mes "You did a great job!"; mes "Here is your reward."; getitem 512,1; //add your rewards here warp SavePoint; end; } - script WoERewardWarper -1,{ end; OnAgitEnd: sleep(2000); //wait two seconds after woe before warping the guild for (set .@i,0; .@i < getarraysize(.castles$); set .@i, .@i+1){ warpguild .map$,.x,.y,getcastledata(.castles$[.@i],1); } end; OnInit: set .map$, "prontera"; set .x, 0; set .y, 0; setarray .castles$[0],"prtg_cas01"; //add your woe castles end; }
  16. I have no idea how to get the id of the item that you try to put a card in, if I knew I could do it for you. A work around would be to make two versions of the item, one with a slot one without a slot and then make a NPC that "cards" your headgear, thus gives you the carded item back and removes your card and unslotted headgear. But I'm pretty sure there is a direct way by getting the id of the item you want to put the card in.
  17. Replace the first line with your NPC settings. Define your area, map and itemlist plus amount of each time under the OnInit Label. You need to add an amount for each item. mapname,x,y,direction script NPCName id,{ for (set .@i, 0;.@i < getarraysize(.items);set .@i, .@i+1){ set .@itemid = .items[.@i]; for (set .@j, 0; .@j < .amount[.@i]; set .@j, .@j+1){ set .@x, rand(.upperleftx,.lowerrightx); set .@y, rand(.lowerrighty,.upperlefty); makeitem .@itemid,1,.map,.@x,.@y; } } end; OnInit: setarray .items[0],0; //add items that should be dropped here setarray .amount, 0; //how many of each item should drop? set .map,"prontera"; //map set .upperleftx,0; //items will be dropped in that area (see below) set .upperlefty,0; set .lowerrightx,0; set .lowerrighty,0; //upperleft - - - - - - - - - //- - - - - - - - - - - - - - //- - - - - - - - - - - - - - //- - - - - - - - - - - - - - //- - - - - - - - - - - - - - //- - - - - - - - - - - - - - //- - - - - - - - - lowerright end; }
  18. It seems this only works for online characters. I need it to work for the entire character database. Any easy fix for this? You can use my script for this. It will reset a player's stats on login. (only once every time you reset)
  19. Hello, I am pretty afraid to mess something up, so I wanted to ask here if my plan is complete and correct. I want to implement new cloth and headgear styles, now I've read some guides and set up this plan: 1. Download this data: http://www.eathena.ws/board/index.php?showtopic=200408&hl=palettes 2. Load all files in my server's GRF 3. Change my src/char_sql/char.c like this: //check other inputs if((slot >= MAX_CHARS) // slots || (hair_style >= 44) // hair style || (hair_color >= 252) // hair color 4. Change my conf/battle/client.conf like this: // valid range of dye's and styles on the client min_hair_style: 0 max_hair_style: 43 min_hair_color: 0 max_hair_color: 251 min_cloth_color: 0 max_cloth_color: 553 I am using a 20101228 Client by the way. Anything else I need to do, or I would do wrong at the moment? Anything I need to change in the rAthena's stylist.txt? Thanks a lot!
  20. Oh, you want the event to run a whole hour so everyone can exchange their cards? I thought you just want to reward the first one who brings the card, that's why I had the .game variable to check if there actually is a game or not. You need to watch out then since when there comes an easy card people will just collect 100 and exchange them. For the IDs check your item_db.txt in your db, db/pre-re or db/re folder (depending on what you run). 4001 - 4453 contains all pre-renewal cards including MvP Cards as far as I know.
×
×
  • Create New...