Jump to content

Dduwsmitt

Members
  • Content Count

    59
  • Joined

  • Last visited

Everything posted by Dduwsmitt

  1. Oh My God! , still not works for me , i copied your script , well theres a a little difference from mine in this line mine : yours : npcshopdelitem "card_shop",909; but still . . . i think its my version of hercules, what version are you using sir Mumbles? im using the latest trunk i downloaded last jan 12 . -- edit The Script always stops here it always add that none, when i sell -- edit I deleted that line, and it continues to this line when im selling cards BUT when i select Complete trade, it does not continue , there goes a stuck windows, i cant close it
  2. Its working to me too , but it does not give points, and it does not delete the card . its saying the deal is completed but , nothing actualy happened xD it said deal is a success Still got my drake card Please Help me to make it usable
  3. //===== rAthena Script =======================================//= Card Trader//===== By: ==================================================//= Euphy//===== Current Version: =====================================//= 1.1 //===== Compatible With: =====================================//= rAthena SVN//===== Description: =========================================//= Exchange cards for points.//============================================================ prontera,165,196,6 script Card Trader 90,{ mes "[Card Trader]"; mes "Hi, "+strcharinfo(0)+"!"; mes "What can I do for you?"; next; switch(select(" > Information: > Trade in cards: > Point shop (^0055FF"+getd(.Points$)+"^000000): > Leave")) { case 1: mes "[Card Trader]"; mes "Do you find that you've got"; mes "useless cards lying around?"; mes "I'll be glad to take them off"; mes "your hands!"; next; mes "[Card Trader]"; mes "I'll give you ^0055FF"+.Points[0]+" Point"+((.Points[0] == 1)?"":"s")+"^000000 for each"; mes "card you give me, and"; mes "^0055FF"+.Points[1]+" Points^000000 for MVP cards."; mes "You can trade those points"; mes "for items later on."; mes "How does that sound?"; emotion e_cash; close; case 2: mes "[Card Trader]"; mes "Select the cards you"; mes "want to trade in."; if (.Level) { mes " "; mes "They must be dropped"; mes "by monsters of level"; mes .Level+" and above."; } deletearray @sold_nameid[0],getarraysize(@sold_nameid); callshop "card_shop",2; npcshopattach "card_shop"; end; case 3: mes "[Card Trader]"; mes "You have ^0055FF"+getd(.Points$)+"^000000 Point"+((getd(.Points$) == 1)?".":"s."); callshop "card_shop",1; npcshopattach "card_shop"; end; case 4: mes "[Card Trader]"; mes "*yawn*"; mes "See you later!"; emotion e_yawn; close; } OnSellItem: mes "Cards to sell:"; mes "-----------------------------------"; for(set .@i,0; .@i<getarraysize(@sold_nameid); set .@i,.@i+1) if (@sold_nameid[.@i] > 4000 && @sold_nameid[.@i] < 4700) { if (.Level) { query_sql("SELECT `LV` FROM `mob_db` WHERE `DropCardid` = "+@sold_nameid[.@i],.@lv); if (.@lv < .Level) { dispbottom getitemname(@sold_nameid[.@i])+" is under the minimum level."; continue; } } set .@card_id[getarraysize(.@card_id)], @sold_nameid[.@i]; set .@card_amt[getarraysize(.@card_amt)], @sold_quantity[.@i]; set .@mvp, compare(.MVP$,""+@sold_nameid[.@i]); mes ((.@mvp)?" ^FF0000":" ^777777")+@sold_quantity[.@i]+"x "+getitemname(@sold_nameid[.@i])+"^000000"; set .@card_total, .@card_total+(@sold_quantity[.@i]*((.@mvp)?.Points[1]:.Points[0])); } deletearray @sold_nameid[0], getarraysize(@sold_nameid); deletearray @sold_quantity[0], getarraysize(@sold_quantity); if (!.@card_id) { mes " ^777777(none)^000000"; emotion e_swt; close; } mes " "; mes "---------- Total: ^0055FF"+.@card_total+" pt.^000000 -------"; next; if(select(" > ^0055FFComplete trade...^000000: > ^777777Cancel^000000") == 2) { mes "[Card Trader]"; mes "Oh, okay..."; emotion e_hmm; close; } for(set .@i,0; .@i<getarraysize(.@card_id); set .@i,.@i+1) delitem .@card_id[.@i],.@card_amt[.@i]; setd .Points$, getd(.Points$)+.@card_total; mes "[Card Trader]"; mes "All done!"; emotion e_ho; close; OnBuyItem: for(set .@i,0; .@i<getarraysize(@bought_nameid); set .@i,.@i+1) for(set .@j,0; .@j<getarraysize(.Shop); set .@j,.@j+2) if (@bought_nameid[.@i] == .Shop[.@j]) { set .@cost, .@cost+(.Shop[.@j+1]*@bought_quantity[.@i]); break; } if (.@cost > getd(.Points$)) { mes "[Card Trader]"; mes "You don't have enough Points."; emotion e_omg; } else { mes "Items purchased:"; mes "-----------------------------------"; for(set .@i,0; .@i<getarraysize(@bought_nameid); set .@i,.@i+1) { getitem @bought_nameid[.@i], @bought_quantity[.@i]; mes " ^777777"+@bought_quantity[.@i]+"x "+getitemname(@bought_nameid[.@i])+"^000000"; } mes " "; mes "---------- Total: ^0055FF"+.@cost+" pt.^000000 -------"; setd .Points$, getd(.Points$)-.@cost; emotion e_cash; } deletearray @bought_nameid[0], getarraysize(@bought_nameid); deletearray @bought_quantity[0], getarraysize(@bought_quantity); close; OnInit: set .Level,0; // Minimum monster level to trade corresponding cards. set .Points$,"#Card_Points"; // Variable to store points. setarray .Shop[0], // Card Shop items: <ID>,<point cost> 4001,1,4004,1,4033,1,4196,1,4197,25,4054,50,4174,75,4047,100; setarray .Points[0],1,5; // Points per <normal card>,<MVP card> set .MVP$, // List of MVP cards. "4121,4123,4128,4131,4132,4134,4135,4137,4142,4143,4144,4145,4146,4147,4148,4168,4236,"+ "4241,4263,4276,4302,4305,4318,4324,4330,4342,4357,4359,4361,4363,4365,4399,4403,4407"; npcshopdelitem "card_shop",909; for(set .@i,0; .@i<getarraysize(.Shop); set .@i,.@i+2) npcshopadditem "card_shop",.Shop[.@i],.Shop[.@i+1]; end;}- shop card_shop -1,909:-1 i cant make it to work on my server, it does not accept the cards that i sell . but no errors on script
  4. //===== Hercules Script ======================================//= Hunting Missions//===== By: ==================================================//= Euphy//===== Current Version: =====================================//= 1.3a//===== Description: =========================================//= Random hunting missions.//= Rewards are based on quest difficulty.//===== Additional Comments: =================================//= 1.0 Initial script.//= 1.1 Small improvements and fixes.//= 1.2 Added party support and replaced blacklists with an//= SQL query, both thanks to AnnieRuru.//= 1.3 Re-added a blacklist adapted for the SQL query.//= 1.3a Added mission reset options.//============================================================ prontera,152,187,6 script Hunting Missions 4_F_EDEN_MASTER,{function Chk; function Cm; mes "[Hunting Missions]"; mes "Hello, "+strcharinfo(0)+"!"; if (!#Mission_Delay) { next; mes "[Hunting Missions]"; mes "I can't find any records..."; mes "You must be new here!"; emotion e_omg; next; callsub Mission_Info; emotion e_go; set #Mission_Delay,1; close; } mes rand(2)?"Working hard, as always...":"Not slacking, I hope..."; mes "Is there anything I can help"; mes "you with?"; mes " "; mes "^777777~ You've completed ^0055FF"+Mission_Total+"^777777 mission"+((Mission_Total == 1)?"":"s")+". ~^000000"; next; switch(select(((!Mission0)?" ~ New Mission::":": ~ Mission Status: ~ Abandon Mission")+": ~ Information: ~ Mission Shop: ~ View Top Hunters: ~ ^777777Cancel^000000")) { case 1: mes "[Hunting Missions]"; if (#Mission_Count) { mes "You've started a mission"; mes "on another character."; close; } if (#Mission_Delay > gettimetick(2) && .Delay) { set .@i, #Mission_Delay-gettimetick(2); if (.@i > 3600) set .@j$, (.@i/3600)+" hour"+(((.@i/3600) == 1)?"":"s"); else if (.@i > 60) set .@j$, (.@i/60)+" minute"+(((.@i/60) == 1)?"":"s"); else set .@j$, (.@i)+" second"+((.@i == 1)?"":"s"); mes "I'm afraid you'll have to wait "+.@j$+" before taking another mission."; close; } mes "You must hunt:"; query_sql("SELECT ID FROM `mob_db` WHERE left(Sprite, 4) != 'meta' AND left(Sprite, 2) != 'E_' AND ~Mode & 32 AND EXP > 0 AND MVP1id = 0 AND DropCardid > 4000 AND DropCardid < 5000 AND ID < 2000 AND instr('"+.Blacklist$+"',ID) = 0 ORDER BY rand() LIMIT "+.Quests, .@mob); for (set .@i,0; .@i<.Quests; set .@i,.@i+1) { setd "Mission"+.@i, .@mob[.@i]; setd "Mission"+.@i +"_",0; } set #Mission_Count, rand(.Count[0],.Count[1]); callsub Mission_Status; next; mes "[Hunting Missions]"; mes "Report back when"; mes "you've finished."; mes "Good luck!"; close; case 2: mes "[Hunting Missions]"; mes "Mission status:"; callsub Mission_Status; close; case 3: mes "[Hunting Missions]"; mes "Do you really want to"; mes "abandon your mission?"; if (.Reset < 0 && .Delay) mes "Your delay time will not be reset."; else if (.Reset > 0) mes "It will cost "+Cm(.Reset)+" Zeny."; next; switch(select(" ~ Abandon...: ~ ^777777Cancel^000000")) { case 1: if (.Reset > 0) { if (Zeny < .Reset) { mes "[Hunting Missions]"; mes "You don't have enough"; mes "Zeny to drop this mission."; emotion e_sry; close; } Zeny -= .Reset; emotion e_cash; } mes "[Hunting Missions]"; mes "Alright, I've dropped"; mes "your current mission."; specialeffect2 EF_STORMKICK4; for(set .@i,0; .@i<.Quests; set .@i,.@i+1) { setd "Mission"+.@i,0; setd "Mission"+.@i+"_",0; } set #Mission_Count,0; if (.Reset < 0 && .Delay) set #Mission_Delay, gettimetick(2)+(.Delay*3600); close; case 2: mes "[Hunting Missions]"; mes "I knew you were kidding!"; mes "Keep up the good work."; emotion e_heh; close; } case 4: callsub Mission_Info; close; case 5: mes "[Hunting Missions]"; mes "You have ^0055FF"+#Mission_Points+"^000000 Mission Points."; mes "Use them well!"; callshop "mission_shop",1; npcshopattach "mission_shop"; end; case 6: mes "[Hunting Missions]"; mes "The top hunters are:"; query_sql("SELECT char_id AS id, (SELECT `name` FROM `char` WHERE char_id = id),`value` FROM `char_reg_num_db` WHERE key = 'Mission_Total' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT 5",.@id,.@name$,.@val); for(set .@i,0; .@i<5; set .@i,.@i+1) mes " [Rank "+(.@i+1)+"] "+((.@name$[.@i] == "")?"^777777none":"^0055FF"+.@name$[.@i]+"^000000 : ^FF0000"+.@val[.@i]+" pt.")+"^000000"; close; case 7: mes "[Hunting Missions]"; mes "Nothing? Okay..."; emotion e_hmm; close; } Mission_Status: set @f,0; deletearray .@j[0], getarraysize(.@j); for(set .@i,0; .@i<.Quests; set .@i,.@i+1) { set .@j[.@i], getd("Mission"+.@i); set .@j[.Quests], .@j[.Quests]+strmobinfo(3,.@j[.@i]); set .@j[.Quests+1], .@j[.Quests+1]+(strmobinfo(6,.@j[.@i])/(getbattleflag("base_exp_rate")/100)*.Modifier[0]); set .@j[.Quests+2], .@j[.Quests+2]+(strmobinfo(7,.@j[.@i])/(getbattleflag("job_exp_rate")/100)*.Modifier[1]); mes " > "+Chk(getd("Mission"+.@i+"_"),#Mission_Count)+strmobinfo(1,.@j[.@i])+" ("+getd("Mission"+.@i+"_")+"/"+#Mission_Count+")^000000"; } // Reward formulas: set .@Mission_Points, 3+(.@j[.Quests]/.Quests/6); set .@Base_Exp, #Mission_Count*.@j[.Quests+1]/5; set .@Job_Exp, #Mission_Count*.@j[.Quests+2]/5; set .@zeny, #Mission_Count*.Quests*.@j[.@i]*.Modifier[2]; next; mes "[Hunting Missions]"; mes "Mission rewards:"; mes " > Mission Points: ^0055FF"+.@Mission_Points+"^000000"; mes " > Base Experience: ^0055FF"+Cm(.@Base_Exp)+"^000000"; mes " > Job Experience: ^0055FF"+Cm(.@Job_Exp)+"^000000"; mes " > Zeny: ^0055FF"+Cm(.@zeny)+"^000000"; if (@f) { set @f,0; return; } next; mes "[Hunting Missions]"; mes "Oh, you're done!"; mes "Good work."; mes "Here's your reward."; emotion e_no1; specialeffect2 EF_ANGEL; specialeffect2 EF_TRUESIGHT; set #Mission_Points, #Mission_Points+.@Mission_Points; set BaseExp, BaseExp+.@Base_Exp; set JobExp, JobExp+.@Job_Exp; Zeny += .@zeny; for(set .@i,0; .@i<.Quests; set .@i,.@i+1) { setd "Mission"+.@i,0; setd "Mission"+.@i+"_",0; } set #Mission_Count,0; if (.Delay) set #Mission_Delay, gettimetick(2)+(.Delay*3600); set Mission_Total, Mission_Total+1; if (Mission_Total == 1) query_sql("INSERT INTO `char_reg_num_db` (`char_id`,`key`,`index`,`value`) VALUES ("+getcharid(0)+",'Mission_Total','0',1)"); else query_sql("UPDATE `char_reg_num_db` SET `value` = "+Mission_Total+" WHERE char_id = "+getcharid(0)+" AND `key` = 'Mission_Total'"); close; Mission_Info: mes "[Hunting Missions]"; mes "If you so choose, I can assign"; mes "you a random hunting quest."; mes "Some are easier than others, but"; mes "the rewards increase with difficulty."; next; mes "[Hunting Missions]"; mes "Missions points are shared"; mes "amongst all your characters."; if (.Delay) mes "Delay time is, too."; mes "You can't take missions on"; mes "multiple characters at once."; next; mes "[Hunting Missions]"; mes "You can start a quest"; if (.Delay) mes "every "+((.Delay == 1)?"hour.":.Delay+" hours."); else mes "whenever you want."; mes "That's everything~"; return; function Chk { if (getarg(0) < getarg(1)) { set @f,1; return "^FF0000"; } else return "^00FF00"; } function Cm { set .@str$, getarg(0); for(set .@i,getstrlen(.@str$)-3; .@i>0; set .@i,.@i-3) set .@str$, insertchar(.@str$,",",.@i); return .@str$; } OnBuyItem: set @cost,0; for(set .@i,0; .@i<getarraysize(@bought_nameid); set .@i,.@i+1) for(set .@j,0; .@j<getarraysize(.Shop); set .@j,.@j+2) if (@bought_nameid[.@i] == .Shop[.@j]) { set @cost, @cost+(.Shop[.@j+1]*@bought_quantity[.@i]); break; } mes "[Hunting Missions]"; if (@cost > #Mission_Points) mes "You don't have enough Mission Points."; else { for(set .@i,0; .@i<getarraysize(@bought_nameid); set .@i,.@i+1) { getitem @bought_nameid[.@i], @bought_quantity[.@i]; dispbottom "Purchased "+@bought_quantity[.@i]+"x "+getitemname(@bought_nameid[.@i])+"."; } set #Mission_Points, #Mission_Points-@cost; mes "Deal completed."; emotion e_cash; } set @cost,0; deletearray @bought_nameid[0], getarraysize(@bought_nameid); deletearray @bought_quantity[0], getarraysize(@bought_quantity); close; OnNPCKillEvent: if (!getcharid(1) || !.Party) { if (!#Mission_Count || !Mission0) end; for (set .@i, 0; .@i<.Quests; set .@i,.@i+1) { if (strmobinfo(1,killedrid) == strmobinfo(1,getd("Mission"+.@i))) { if (getd("Mission"+.@i+"_") < #Mission_Count) { dispbottom "[Hunting Mission] Killed "+(set(getd("Mission"+.@i+"_"),getd("Mission"+.@i+"_")+1))+" of "+#Mission_Count+" "+strmobinfo(1,killedrid)+"."; end; } } } } else if (.Party) { set .@mob, killedrid; getmapxy(.@map1$,.@x1,.@y1,0); getpartymember getcharid(1),1; getpartymember getcharid(1),2; for(set .@i,0; .@i<$@partymembercount; set .@i,.@i+1) { if (isloggedin($@partymemberaid[.@i], $@partymembercid[.@i])) { attachrid $@partymemberaid[.@i]; if (#Mission_Count && Mission0 && Hp > 0) { getmapxy(.@map2$,.@x2,.@y2,0); if ((.@map1$ == .@map2$ || .Party == 1) && (distance(.@x1,.@y1,.@x2,.@y2) <= 30 || .Party < 3)) { for(set .@j,0; .@j<.Quests; set .@j,.@j+1) { if (strmobinfo(1,.@mob) == strmobinfo(1,getd("Mission"+.@j))) { if (getd("Mission"+.@j+"_") < #Mission_Count) { dispbottom "[Hunting Mission] Killed "+(set(getd("Mission"+.@j+"_"),getd("Mission"+.@j+"_")+1))+" of "+#Mission_Count+" "+strmobinfo(1,.@mob)+"."; break; } } } } } } } } end; OnInit: set .Delay,12; // Quest delay, in hours (0 to disable). set .Quests,4; // Number of subquests per mission (increases rewards). set .Party,3; // Party options: 0 (exclude party kills), 1 (include party kills), 2 (same map only), 3 (screen area only) set .Reset,-1; // Reset options: -1 (abandoning mission sets delay time), 0 (no delay time), [Zeny] (cost to abandon mission, no delay time) setarray .Count[0], // Min and max monsters per subquest (increases rewards). 40,70; setarray .Modifier[0], // Multipliers for Base Exp, Job Exp, and Zeny rewards. getbattleflag("base_exp_rate")/100,getbattleflag("job_exp_rate")/100,60; setarray .Shop[0], // Reward items: <ID>,<point cost> (about 10~20 points per hunt). 512,1,513,1,514,1,538,5,539,5,558,10,561,10; set .Blacklist$, // Blacklisted mob IDs. "1062,1088,1183,1186,1200,1212,1220,1221,1234,1235,"+ "1244,1245,1250,1268,1290,1293,1294,1296,1298,1299,"+ "1300,1301,1303,1304,1305,1306,1308,1309,1311,1313,"+ "1515,1588,1618,1676,1677,1678,1679,1796,1797,1974,"+ "1975,1976,1977,1978,1979"; npcshopdelitem "mission_shop",512; for(set .@i,0; .@i<getarraysize(.Shop); set .@i,.@i+2) npcshopadditem "mission_shop", .Shop[.@i], .Shop[.@i+1]; end;}- shop mission_shop -1,512:-1 Error when viewing top hunters
  5. there are no more global_reg_value on the sql database. please help how to fix , hunting mission quest ase 6: mes "[Hunting Missions]"; mes "The top hunters are:"; query_sql("SELECT char_id AS id, (SELECT `name` FROM `char` WHERE char_id = id),`value` FROM `global_reg_value` WHERE str = 'Mission_Total' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT 5",.@id,.@name$,.@val); for(set .@i,0; .@i<5; set .@i,.@i+1) mes " [Rank "+(.@i+1)+"] "+((.@name$[.@i] == "")?"^777777none":"^0055FF"+.@name$[.@i]+"^000000 : ^FF0000"+.@val[.@i]+" pt.")+"^000000"; close;
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.