Jump to content

sotf

Members
  • Posts

    173
  • Joined

  • Last visited

Everything posted by sotf

  1. ^Thank you again Sir Capuche! This helped me a lot really, and thank you very much for the tip
  2. Hi rAthena, I hope you can help me on this one. Here's my script: hyrule,142,183,4 script MVP Ladder 459,{ set .ahmel$,"^00aa00[MVP Ladder]^000000"; mes .ahmel$; mes "I list those players who succeeds to kill MVP and/or Mini Boss monsters and organize them on a Ranking List!"; mes "^0000ffMVP Boss^000000 = 3 points"; mes "^0000ffMini Boss^000000 = 1 point"; next; if(getgroupid() == 99) { switch(select("Show MVP Ladder:Point Shop:Reset Ladder:Cancel")) { case 1: goto mvprank; case 2: goto pointshop; case 3: goto reset; case 4: goto cancel; } } else { switch(select("Show MVP Ladder:Point Shop:Cancel")) { case 1: goto mvprank; case 2: goto pointshop; case 3: goto cancel; } } pointshop: mes .ahmel$; mes "Here you can use your MVP Points to purchase useful items:"; next; mes "^0000ffMVP Badge^000000: requirement for Class Specialization"; mes "^ffffff.^000000"; //mes "^0000ffArmor Exchange Ticket^000000: useful if you want to exchange your QUEST armor for another QUEST armor of the same level"; //mes "^ffffff.^000000"; //mes "^0000ffWeapon Exchange Ticket^000000: useful if you want to exchange your QUEST weapon for another QUEST weapon"; //mes "^ffffff.^000000"; //mes "^0000ffHeadgear Exchange Ticket^000000: useful if you want to exchange your tier 3 QUEST headgears for another tier 3 QUEST headgear set"; //mes "^ffffff.^000000"; switch(select("MVP Badge - 30 pts:^aaaaaaArmor Exchange Ticket - 150 pts:Weapon Exchange Ticket - 150 pts:Headgear Exchange Ticket - 150 pts^000000")) { case 1: next; set .@price,30; set .@mvpitem$,"MVP Badge"; set .@itemshit,26047; mes .ahmel$; mes "How many MVP Badge do you want to purchase?"; input .@quantity; next; goto shopmenu; case 2: next; mes .ahmel$; mes "Not yet implemented!"; close; //set .@price,150; //set .@mvpitem$,"Armor Excange Ticket"; //set .@itemshit,26018; //mes .ahmel$; //mes "How many Armor Exchange Ticket do you want to purchase?"; //input .@quantity; //next; //goto shopmenu; case 3: next; mes .ahmel$; mes "Not yet implemented!"; close; //set .@price,150; //set .@mvpitem$,"Weapon Exchange Ticket"; //set .@itemshit,26020; //mes .ahmel$; //mes "How many Weapon Exchange Ticket do you want to purchase?"; //input .@quantity; //next; //goto shopmenu; case 4: next; mes .ahmel$; mes "Not yet implemented!"; close; //set .@price,150; //set .@mvpitem$,"Headgear Exchange Ticket"; //set .@itemshit,26019; //mes .ahmel$; //mes "How many Headgear Exchange Ticket do you want to purchase?"; //input .@quantity; //next; //goto shopmenu; } shopmenu: mes .ahmel$; mes "You're going to purchase "+.@quantity+" "+.@mvpitem$+", proceed?"; menu "Yes",yesbadge,"Cancel",nobadge; yesbadge: next; query_sql( "SELECT `name`='"+strcharinfo(0)+"',`Count` FROM `E-MVPRank`",.@Name$,.@Count ); if(.@Count < .@price*.@quantity){ mes .ahmel$; mes "Insufficient Points"; mes ""+.@Count+" "+.@quantity+" "+.@price+""; close; } else { getitem .@itemshit,.@quantity; set .@quantity,.@quantity*.@price; query_sql( "INSERT INTO `E-MVPRank` SET `char_id`='"+getcharid(0)+"',`name`='"+strcharinfo(0)+"',`Count`='3' ON DUPLICATE KEY UPDATE `Count`=`Count`-"+.@quantity+"" ); mes .ahmel$; mes "Done! Here are your "+.@mvpitem$+"."; mes "^ff0000"+.@quantity+" pts^000000 have been deducted to you"; close;} nobadge: next; mes .ahmel$; mes "Alright! Come back when you're decided."; close; mvprank: query_sql( "SELECT `name`,`Count` FROM `E-MVPRank` ORDER BY `Count` DESC LIMIT 5",.@Name$,.@Count ); if( getarraysize( .@Name$ ) ){ for( set .@i,0; .@i < getarraysize( .@Name$ ); set .@i,.@i + 1 ) mes "[# "+( .@i + 1 )+" ]^ff0000 "+.@Name$[.@i]+" ^000000- "+.@Count[.@i]+" Point(s)"; if(getgroupid() == 99) { switch(select("Reset Ladder","Close")) { case 1: goto reset; case 2: close; } } else { close; } } else{ mes .ahmel$; mes "No Record Found."; close; end; } reset: next; mes .ahmel$; mes "Are you really sure you want to reset the MVP Ladder?"; switch(select("Yes","Cancel")) { case 1: next; mes .ahmel$; mes "Input Reset Password:"; next; input .@pwdreset$; if(.@pwdreset$ == "phoenix") { mes .ahmel$; mes "Done!"; query_sql( "TRUNCATE TABLE `e-mvprank`;" ); announce "[MVP Ladder]: Ranking is Reset! Goodluck Boss-hunting everyone!",bc_all,0xdddddd; end; close; } else if(.@pwdreset$ != "phoenix") { next; mes .ahmel$; mes "INVALID PASSWORD!"; end; close; } case 2: close; } cancel: mes .ahmel$; mes "Okay, goodluck hunting MVPs!"; end; close; OnNPCKillEvent: if( getmonsterinfo( killedrid,MOB_MVPEXP ) ) { query_sql( "INSERT INTO `E-MVPRank` SET `char_id`='"+getcharid(0)+"',`name`='"+strcharinfo(0)+"',`Count`='3' ON DUPLICATE KEY UPDATE `Count`=`Count`+2" ); announce "[MVP Ladder]: "+strcharinfo(0)+" slained "+getmonsterinfo( killedrid,MOB_NAME )+" at "+strcharinfo(3),bc_all,0xdddddd; } if ( getmonsterinfo( killedrid,MOB_MODE ) & 0x0020 ) { query_sql( "INSERT INTO `E-MVPRank` SET `char_id`='"+getcharid(0)+"',`name`='"+strcharinfo(0)+"',`Count`='1' ON DUPLICATE KEY UPDATE `Count`=`Count`+1" );} end; } And I'm having a big problem in this part: yesbadge: next; query_sql( "SELECT `name`='"+strcharinfo(0)+"',`Count` FROM `E-MVPRank`",.@Name$,.@Count ); if(.@Count < .@price*.@quantity){ mes .ahmel$; mes "Insufficient Points"; close; } What's the right sql query that call's a specific character's row and shows the count?
  3. You can find some here: http://www.usamimi.info/~saecreate/?lang=en don't forget to thank the creator of those
  4. Hi rAthena! I'm here to share a Broadcast Script that I edited. ( original thread: http://rathena.org/board/topic/66794-broadcaster/ ) //Broadcast NPC prontera,159,181,5 script Broadcaster 858,{ if (.delay > gettimetick(2)) { mes "============================="; mes "Wait for 2 minutes to pass before you can use this service again."; mes "============================="; close; } mes "============================="; mes "Broadcast Fee:"; mes "Normal Color(white): 90,000z"; mes "Custom Color: 150,000z"; mes "Random Color: 100,000z"; mes "============================="; mes "Cooldown: 2 minutes"; mes "============================="; menu "Broadcast",yes,"Cancel",no; yes: if(Zeny < 100000) goto nozeny; next; mes "============================="; mes "Select broadcast type:"; mes "============================="; menu "Normal",normal,"Custom Color",custom,"Random Color",random,"Cancel",-; next; mes "============================="; mes "Broadcast Cancelled."; mes "============================="; close; normal: next; mes "============================="; mes "Input message:"; mes "============================="; input @message$; set Zeny,Zeny-90000; announce "[Shout] "+strcharinfo(0)+": "+@message$+" ",bc_all,0xFFFFFF; set .delay, gettimetick(2) + 120; close; custom: next; mes "============================="; mes "Input Color:"; mes "^ffffff.^000000"; mes "Format: ^ff0000XX^00ff00YY^0000ffZZ^000000"; mes "VALUES MUST BE 0123456789ABCDEF ONLY"; mes "============================="; input @color$; if(getstrlen(@color$) == 6) { set @scolor$,substr(""+@color$+"", 0,5); set .z1$,substr(""+@scolor$+"", 0,0); set .z2$,substr(""+@scolor$+"", 1,1); set .z3$,substr(""+@scolor$+"", 2,2); set .z4$,substr(""+@scolor$+"", 3,3); set .z5$,substr(""+@scolor$+"", 4,4); set .z6$,substr(""+@scolor$+"", 5,5); next; if( .z1$ == "1" || .z1$ == "2" || .z1$ == "3" || .z1$ == "4" || .z1$ == "5" || .z1$ == "6" || .z1$ == "7" || .z1$ == "8" || .z1$ == "9" || .z1$ == "0" || .z1$ == "a" || .z1$ == "b" || .z1$ == "c" || .z1$ == "d" || .z1$ == "e" || .z1$ == "f" ) {if( .z2$ == "1" || .z2$ == "2" || .z2$ == "3" || .z2$ == "4" || .z2$ == "5" || .z2$ == "6" || .z2$ == "7" || .z2$ == "8" || .z2$ == "9" || .z2$ == "0" || .z2$ == "a" || .z2$ == "b" || .z2$ == "c" || .z2$ == "d" || .z2$ == "e" || .z2$ == "f" ) {if( .z3$ == "1" || .z3$ == "2" || .z3$ == "3" || .z3$ == "4" || .z3$ == "5" || .z3$ == "6" || .z3$ == "7" || .z3$ == "8" || .z3$ == "9" || .z3$ == "0" || .z3$ == "a" || .z3$ == "b" || .z3$ == "c" || .z3$ == "d" || .z3$ == "e" || .z3$ == "f" ) {if( .z4$ == "1" || .z4$ == "2" || .z4$ == "3" || .z4$ == "4" || .z4$ == "5" || .z4$ == "6" || .z4$ == "7" || .z4$ == "8" || .z4$ == "9" || .z4$ == "0" || .z4$ == "a" || .z4$ == "b" || .z4$ == "c" || .z4$ == "d" || .z4$ == "e" || .z4$ == "f" ) {if( .z5$ == "1" || .z5$ == "2" || .z5$ == "3" || .z5$ == "4" || .z5$ == "5" || .z5$ == "6" || .z5$ == "7" || .z5$ == "8" || .z5$ == "9" || .z5$ == "0" || .z5$ == "a" || .z5$ == "b" || .z5$ == "c" || .z5$ == "d" || .z5$ == "e" || .z5$ == "f" ) {if( .z6$ == "1" || .z6$ == "2" || .z6$ == "3" || .z6$ == "4" || .z6$ == "5" || .z6$ == "6" || .z6$ == "7" || .z6$ == "8" || .z6$ == "9" || .z6$ == "0" || .z6$ == "a" || .z6$ == "b" || .z6$ == "c" || .z6$ == "d" || .z6$ == "e" || .z6$ == "f" ) goto zcustom;} else { goto xcustom; }} else { goto xcustom; }} else { goto xcustom; }} else { goto xcustom; }} else { goto xcustom; } close; } else { goto xcustom; } close; random: next; set .random1, rand(0,15); set .random2, rand(0,15); set .random3, rand(0,15); set .random4, rand(0,15); set .random5, rand(0,15); set .random6, rand(0,15); set .c1$, charat("1234567890abcdef", .random1); set .c2$, charat("1234567890abcdef", .random2); set .c3$, charat("1234567890abcdef", .random3); set .c4$, charat("1234567890abcdef", .random4); set .c5$, charat("1234567890abcdef", .random5); set .c6$, charat("1234567890abcdef", .random6); mes "============================="; mes "Your message will be in RANDOM COLOR"; mes "Input message:"; mes "============================="; input @message$; set Zeny,Zeny-100000; atcommand "@kamic "+.c1$+""+.c2$+""+.c3$+""+.c4$+""+.c5$+""+.c6$+" [Shout] "+strcharinfo(0)+": "+@message$+" "; set .delay, gettimetick(2) + 120; close; no: next; mes "============================="; mes "Broadcast Cancelled"; mes "============================="; close; zcustom: next; mes "============================="; mes "Input message:"; mes "============================="; input @message$; set Zeny,Zeny-150000; atcommand "@kamic "+@scolor$+" [Shout] "+strcharinfo(0)+": "+@message$+" "; set .delay, gettimetick(2) + 120; close; xcustom: next; mes "============================="; mes "Wrong Format."; mes "============================="; close; nozeny: next; mes "============================="; mes "Not enough Zeny"; mes "============================="; close; end; } Features: - 3 types of broadcast: Normal : white color broadcast Custom: you'll have to input the color that you want (RRGGBB format) Random: the NPC will choose a random color for you - Delay after another usage (2 minutes) broadcast will look like this: The script is quite long due to the fact that I have to restrict the usage of other characters other from 1234567890abcdef because I have to use this: If anyone knows how to minimize that part of the code(the z variables part), it would be great Please do let me know how can I make this script better. My edit is a bit amatuer-ish, I know. But I hope you like it broadcastnpc.txt
  5. Good Day rAthena! Yeah I know that there's an existing Faction System, but it's not compatible with my revision and it is not compatible with the Global Damage Adjustment mod :/ All I wish for is a mod that lets me have 2-3 Race/Faction (Dark, Light, Mortal) and all I need it to do is to have a pvp mapflag(or whatever possible) where players of the same race/faction wont be able to hit/kill each other. Ah btw, I'm planning to associate this with Euphy's Class Specialization. I edited it and seperated each specialization path into 2, which is dark path and light path. If this is possible with even just a script, it'll be a great addition to my server! Thanks in advance! btw I'm using svn rev 17539
  6. Hi! Does this work on the latest rAthena revision if I manually apply the patch file?
  7. Just click the thumbnail to see the whole photo. Is it illegal to put up a Showcase thread? Our server is using that patcher so I don't think I will release it.... yet. The reason I posted it here is because I wanted it to be rated by pros, so they can tell me how can I improve myself on making patcher skins
  8. Hi rAthena! I made a patcher skin for our new server, I really dunno if I did it well because I don't really know that much about these stuffs (studied it just a few days ago). Anyways, here it is: The navigational buttons on the right side changes it's color when hovered (just like in SAO). The thumbnail rotates, showing our server's features, etc. Feel free to comment and rate.
  9. Actually you can just do it like this... Instead of an NPC, make Skorm's script a function script. Then create a consumable item that calls the said function. Then if you want it as a daily reward, edit the settings of the daily rewards script that Keough posted and put the item there.
  10. Hi again rAthena, is there any existing WoE script that instead of declaring the last castle holder as the winner, it will declare the guild that defended the castle for the longest time? bump :/
  11. sotf

    in-game clock

    @Emistry Thanks a lot, this is exactly what I needed @LuLu Thank you @Lil Troll It works as well, thanks a lot
  12. sotf

    in-game clock

    Do you mind sharing it to me?
  13. sotf

    in-game clock

    I know there's an archived thread with the same title but please hear me out first.. First and foremost, good day rAthena! My players are used to the old but reliable Toasty's WoE setter, but since it lags a bit during WoE times, I migrated into using Euphy's WoE controller. I know it's better in many ways, the castle warp is really convinient and all. But like I said, we are used to Toasty's script having a timer during WoE, that pub above the npc that tells how much time is left. So my request is this, if possible, an in-game clock that dispays the server time in a pub above an NPC, or a WoE timer with the same feature as Toasty's. I know @time displays the server time, but I want something that the players can see immediately, and you know sometimes when players are in rush because of WoE and all that. Thanks in advance for those who are going to help!
  14. I tried this script, I can't @item any item haha. I removed the script, and the effect is still there haha now I can't @item anything fixed my problem with: - script unbinditem -1,{ OnInit: unbindatcmd "item"; } I REALLY do hope that there's a working script that works like this :/
  15. Thanks! I'll try it. I was just trying to improvise on what I knew, this will help me a lot, thanks again!
  16. Good day again rAthena! Well, I made a pvp warper script, which is just a simple script that warps a player to some various pvp maps. I added a feature where the pvp warper will be disabled and a npc will be enabled which tells the players that the pvp room is locked. Here's my script: celestiaj,73,86,6 script PVP Warper 497,{ mes "^ff0000[PVP Warper]^000000"; mes "Which PVP room do you want to warp to?"; next; menu "Normal - No Restrictions",normal,"Trans - 2nd jobs only!",trans,"Non-donate Normal",nodonate,"Non-donate Trans",nodonate2,"Classic PVP - No Customs",classic,"Cancel",canc; normal: next; announce "PVP: "+strcharinfo(0)+" just entered PVP:Normal!",bc_all,0x33FF99; warp "pvp_n_1-5",0,0; end; trans: next; mes "^ff0000[PVP Warper]^000000"; mes "WARNING! If you're not a 2nd job trans player, you will be automatically warped out of the map!"; next; mes "What will you do?"; menu "Proceed",proceed1,"Cancel",out1; proceed1: announce "PVP: "+strcharinfo(0)+" just entered PVP:Trans!",bc_all,0x33FF99; warp "pvp_y_1-2",0,0; end; out1: next; close; nodonate: next; mes "^ff0000[PVP Warper]^000000"; mes "WARNING! If you are equipped with donate equipments upon entering the map, you will be automatically be warped back to your save point!"; next; mes "What will you do?"; menu "Proceed",proceed,"Cancel",out; proceed: next; announce "PVP: "+strcharinfo(0)+" just entered PVP:Non-Donate!",bc_all,0x33FF99; warp "pvp_n_4-3",0,0; end; out: next; close; nodonate2: next; mes "Feature not yet impelemented"; close; classic: next; mes "^ff0000[PVP Warper]^000000"; mes "WARNING! If you are equipped with any custom equipments upon entering the map, you will be automatically be warped back to your save point!"; next; mes "What will you do?"; menu "Proceed",pro123,"Cancel",out123; pro123: next; announce "PVP: "+strcharinfo(0)+" just entered PVP:Classic!",bc_all,0x33FF99; warp "5@tower",0,0; end; out123: next; canc: close; OnInit: disablenpc "PVP Locked"; } celestiaj,73,86,6 script PVP Locked 497,{ waitingroom "PvP Rooms Locked!",0; mes "^ff0000[PVP Warper]^000000"; mes "PvP Rooms are not accessible right now, please come back later."; close; } - script woenopvp -1,{ OnClock1450: announce "WoE is starting soon! PvP Rooms will be inaccessible!",bc_all,0x99FFFF; disablenpc "PVP Warper"; enablenpc "PVP Locked"; end; OnClock1601: announce "WoE has ended! PvP Rooms are now accessible!",bc_all,0x99FFFF; disablenpc "PVP Locked"; enablenpc "PVP Warper"; end; OnClock2050: announce "WoE is starting soon! PvP Rooms will be inaccessible!",bc_all,0x99FFFF; disablenpc "PVP Warper"; enablenpc "PVP Locked"; end; OnClock2201: announce "WoE has ended! PvP Rooms are now accessible!",bc_all,0x99FFFF; disablenpc "PVP Locked"; enablenpc "PVP Warper"; end; } It does lock the pvp room, but it doesn't unlock it. what might be wrong on my script? :/ Help anyone? Thanks in advance for those who are going to help
  17. yea those freaking brackets haha! Thanks a lot guys! I appreciate all the help
  18. Thank you so much, you helped me once again. I'll try it as soon as I can. I modified the script a bit, into this: - shop costume_shop -1,501:-1 alb2trea,56,41,5 script Capt. Krauser 561,{ mes "^0000ff[Capt. Krauser]^000000"; mes "Ahoy mate! Do ye have spare costumes"; mes "that ye wanna get rid 'o?"; next; set .@s, select( "No! Goood bye.", "Trade-in Costumes", "More information" ); if( .@s == 1 ) mes "^0000ff[Capt. Krauser]^000000"; mes "Okay 'ave a nice day."; else if( .@s == 3 ) { mes "^0000ff[Capt. Krauser]^000000"; mes "I needs more clothes fer me mates fer our adventures in th' sea, so I be buyin' some fer these ^00ff00Pirate Doubloons^000000 that we 'ave!"; next; mes "^0000ff[Capt. Krauser]^000000"; mes "These loots might come in handy fer ye someday too mate!"; } getinventorylist; .@calc = 1024|2048|4096|8192;// to lazy to calculate for( set .@i, 0; .@i < @inventorylist_count; set .@i, .@i + 1 ) if( !@inventorylist_expire[.@i] ) { if ( getiteminfo( @inventorylist_id[.@i],5 ) & .@calc ) { for( set .@j, 0; .@j < @inventorylist_amount[.@i]; set .@j, .@j + 1 ) { set .@list_id[ .@size_shop ], @inventorylist_id[.@i]; set .@size_shop, .@size_shop + 1; } } } if( !.@size_shop ) mes "^0000ff[Capt. Krauser]^000000"; mes "Shiver me timbers! I don't see any costumes on yer booty mate!"; else { mes "^0000ff[Capt. Krauser]^000000"; mes "Okay, here's a list o' th' costumes in yer loot."; next; npcshopitem "costume_shop",501,-1; for( set .@i, 0; .@i < .@size_shop; set .@i, .@i + 1 ) npcshopadditem "costume_shop",.@list_id[.@i],0; npcshopdelitem "costume_shop",501; callshop "costume_shop", 1; npcshopattach "costume_shop"; } end; OnBuyItem: // if( !checkweight2( .reward_ID,.reward_amount ) ) { // message strcharinfo(0),"You need additional weight capacity to complete this trade."; // close; // } set .@count, getarraysize( @bought_nameid ); for( set .@i, 0; .@i < .size_count; set .@i, .@i + 1 ) {// don't check the weight.. set .@check, .reward_amount[.@i] * .@count; if( .@check > 30000 ) { message strcharinfo(0),"You can't purchase that many "+ getitemname( .reward_ID[.@i] ) +"."; end; } set .@gain$, .@gain$ + ( getstrlen( .@gain$ ) ? ", " : "" ) + .@check +" "+ getitemname( .reward_ID[.@i] ); } mes "Sell the costume for "+ .@gain$ +"?"; next; if( select( "Yes, I sell", "No" ) -1 ) end; for( set .@i, 0; .@i < .@count; set .@i, .@i + 1 ) if ( countitem( @bought_nameid[.@i] ) < @bought_quantity[.@i] ) { mes "Have you lost one item?"; close; } for( set .@i, 0; .@i < .@count; set .@i, .@i + 1 ) delitem @bought_nameid[.@i], @bought_quantity[.@i]; for( set .@i, 0; .@i < .size_count; set .@i, .@i + 1 ) getitem .reward_ID[.@i], .reward_amount[.@i] * .@count; mes "Nice doin' business wit' ye!"; close; OnInit: setarray .reward_ID, 7875; // item ID gained - you can add more ID <item ID>, <item ID>,... setarray .reward_amount, 1; // item count gained - ( count of the item /element of array of .reward_ID ) set .size_count, getarraysize( .reward_amount ); end; } and I get this error: What should I do? :/
  19. Good Day rAthena! I know I have requested this a while back (http://rathena.org/board/topic/79595-costumeheadgear-gacha-npc/) But since I've been adding quite a few hundreds of costumes, it's been really a pain to add them manually. Can someone help me modify this script for it to buy Costume Equips in General and not just a few specific IDs? Here's the script from the thread above: - shop costume_shop -1,501:-1 prontera,150,180,5 script bghjkl 58,{ mes "Hi Good Day! Do you have spare costumes !"; mes "that you wanna get rid of?"; next; set .@s, select( "No ! Goood bye.", "Trade", "More informations" ); if( .@s == 1 ) mes "Okay have a nice day."; else if( .@s == 3 ) { mes "blabla more informations."; } getinventorylist; for( set .@i, 0; .@i < @inventorylist_count; set .@i, .@i + 1 ) if( !@inventorylist_expire[.@i] ) { while( getd( ".costume_id"+ .@k +"[0]" ) ) { while( .@j < getd( ".size_costume"+ .@k ) && @inventorylist_id[.@i] != getd( ".costume_id"+ .@k +"["+ .@j +"]" ) ) set .@j, .@j + 1; if( .@j != getd( ".size_costume"+ .@k ) ) { for( set .@h, 0; .@h < @inventorylist_amount[.@i]; set .@h, .@h + 1 ) { set .@list_id[ .@size_shop ], @inventorylist_id[.@i]; set .@size_shop, .@size_shop + 1; } break; } set .@j, 0; set .@k, .@k + 1; } set .@k, 0; } if( !.@size_shop ) mes "Hmm I don't see any costumes on your inventory. Please check your inventory."; else { mes "Okay, here's a list of the costumes in your inventory."; next; npcshopitem "costume_shop",501,-1; for( set .@i, 0; .@i < .@size_shop; set .@i, .@i + 1 ) npcshopadditem "costume_shop",.@list_id[.@i],0; npcshopdelitem "costume_shop",501; callshop "costume_shop", 1; npcshopattach "costume_shop"; } close; OnBuyItem: // if( !checkweight2( .item_exchangeID,.item_count ) ) { // message strcharinfo(0),"You need additional weight capacity to complete this trade."; // close; // } set .@count, getarraysize( @bought_nameid ); for( set .@i, 0; .@i < .size_count; set .@i, .@i + 1 ) { set .@check, .item_count[.@i] * .@count; if( .@check > 30000) { message strcharinfo(0),"You can't purchase that many "+ getitemname( .item_exchangeID[.@i] ) +"."; end; } set .@gain$, .@gain$ + ( getstrlen( .@gain$ ) ? ", " : "" ) + .@check +" "+ getitemname( .item_exchangeID[.@i] ); } mes "Sell the costume for "+ .@gain$ +"?"; next; if( select( "Yes, I sell", "No" ) -1 ) close; for( set .@i, 0; .@i < .@count; set .@i, .@i + 1 ) delitem @bought_nameid[.@i], @bought_quantity[.@i]; for( set .@i, 0; .@i < .size_count; set .@i, .@i + 1 ) getitem .item_exchangeID[.@i], .item_count[.@i] * .@count; mes "good bye."; close; OnInit: // Item gained // ----------- setarray .item_exchangeID, 7539; // item ID gained - you can add more ID <item ID>, <item ID>,... setarray .item_count, 10; // item count gained - ( count of the item /element of array of .item_exchangeID ) set .size_count, getarraysize( .item_count ); // Costume trade ID // size array must be < 128 // use the synthaxe .costume_idX for adding news array // ------------------------------------------------ setarray .costume_id0, 20000, 20001; setarray .costume_id1, 20002, 20003; while( getd( ".costume_id"+ .@i +"[0]" ) ) { setd ".size_costume"+ .@i, getarraysize( getd( ".costume_id"+ .@i ) ); set .@i, .@i +1; } end; } Thank you for those who are going to help
  20. Hi rAthena, I hope you can help me on this one too I was having a hard time about these homun skills, most of the time it says "skill cannot be used within this area". Did I miss something? Catalysts or anything? How can I make these skills cast-able everywhere? Thanks in advanced for those who are going to answer my questions bump! Anyone? :/
  21. Thanks! It now works the way I wanted to
  22. Thanks! I'll give this one a try! I get this error : [Error]: script:set: not a variable [Debug]: Data: number value=632224 From this: celestiaj,97,98,2 script Old Man 120,{ .@time = gettimetick(1); if( .@time < #weekly_item ){ if(getgroupid() >= 80) { mes "You already got your supplies, next supplies will arrive after 7 days!"; close;} else { mes "[Old Man]"; mes "Hehehe.."; close;} }else{ if(getgroupid() >= 80) { #weekly_item += ( .@time + ( 7 * 86400 ) ); getitem 25500,1000; getitem 21204,1000; getitem 21369,1000; rentitem 7919,604800; mes "Here's your supply for this week! You may get your supplies next week when your Festival Ticket expires";} else { mes "[Old Man]"; mes "Hehehe.."; close;} } close; } bump! Anyone? :/
  23. ^Is it possible to enchant accessories only, or headgears and accessories only? Like I said, this script will make rental armors into permanent ones, which is not good
×
×
  • Create New...