Jump to content

DR4LUC0N

Members
  • Posts

    135
  • Joined

  • Last visited

Everything posted by DR4LUC0N

  1. Oops, should have been more specific, basically it would be to check the party member if they entered before against the sql(bloody_branch) table for the NPC. Because I can do a check at the beginning for the person attached to the NPC, but not the party member. So the party member can use same PC with different IP and get in.
  2. So I have a script that checks for party members IP, but I'd like to also have it check their Unique_id(to prevent using a different PC without VPN and to prevent using same PC with VPN) I've been knocking my head on the table for an hour now trying to figure it out. I'm using SQL because I'm having the table get TRUNCATED at OnClock0000(couldn't find any other way to remove everyones variable). //===== rAthena Script ======================================= //= MVP Ladder Game //===== By: ================================================== //= aftermath, AnnieRuru (rewrite) //===== Current Version: ===================================== //= 1.0 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Gather a party and kill every MVP in ascending order. //===== Additional Comments: ================================= //= 1.0 First version, edited. [Euphy] //============================================================ veil,81,134,6 script Quistis Trepe 10414,{ .gui = get_unique_id (); .@nb = query_sql("SELECT `bloodybranch` FROM `bloody_branch` WHERE `unique_id` = "+.gui+" LIMIT 1", .@bbq); mes "[Quistis Trepe]"; mes "Say... do you want to play the MvP Ladder game? It cost 15 Vote Coins Per person, total of 30 Vote Coins now to get in."; next; switch(select("Yes, let's get it on!:Information.:Show me the best record.:No.")) { case 1: if (.@bbq <= 0) { break; } else if (.@bbq >= 1) { mes "You have already completed the Bloody Branch Quest for today. Come back tomorrow after 12:00am server time."; close; } case 2: mes "[Quistis Trepe]"; mes "In this game, your party has to kill every single MvP monster in ascending order, from the weakest to strongest."; if ( .finish_item_amount ) mes "If your party can finish the MVP ladder game, each member will earn "+ callfunc("F_InsertPlural", .finish_item_amount, getitemname( .finish_item_id )) +"."; if ( .register_cost ) // mes "But the entrance fee is "+ callfunc( "F_InsertComma", .register_cost ) +" zeny."; mes "But the entrance fee is 15 vote coins per person, which means 30 Vote Coin total."; mes "Everyone need to vote on the websites to get 300 Vote Point, you can exchange them for 30 Vote Coins with the VoteForPoints Npc"; next; mes "[Quistis Trepe]"; mes "You lose the game if you can't finish in "+ .timeout +" minutes, or if your entire party is killed."; mes "Good luck!"; close; case 3: mes "[Quistis Trepe]"; if ( !$mvpladdderparty_time ) { mes "Nobody has finished this game yet."; close; } mes "The best record is"; mes "[ "+( $mvpladdderparty_time / 60 )+" min "+( $mvpladdderparty_time % 60 )+" sec ]"; mes "By the party ^FF0000"+ $mvpladdderparty_name$ +"^000000."; .@size = getarraysize( $mvpladderparty_member$ ); for ( .@i = 0; .@i < .@size; .@i++ ) mes "^000000"+ ( .@i +1 ) +". ^0000FF"+ $mvpladderparty_member$[.@i]; if ( getgmlevel() < .gmlvlreset ) close; next; if ( select( "Close.", "Reset the record." ) == 1 ) close; if ( select( "Never mind.", "I really want to reset it." ) == 1 ) close; $mvpladdderparty_time = 0; $mvpladdderparty_name$ = ""; deletearray $mvpladderparty_member$[.@i]; mes "[Quistis Trepe]"; mes "Record reset successfully."; close; case 4: mes "[Quistis Trepe]"; mes "When you are strong enough to complete the game, please come back."; close; } if ( !getcharid(1) ) { mes "[Quistis Trepe]"; mes "You have to form a party to play."; close; } if ( is_party_leader() == false ) { mes "[Quistis Trepe]"; mes "Only the party leader can register."; close; } .@origin = getcharid(3); getpartymember getcharid(1),1; getpartymember getcharid(1),2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if (isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) == 0) continue;{ .@class = readparam( Class, $@partymembercid[.@i] ); if (compare( .@job_list$, "|" + .@class + "|" ) == 1) { mes "Sorry, only one " + jobname(.@class) + " is allowed."; close; } .@job_list$ += "|" + .@class + "|"; .@online++; } } // START OF NEW CHECK - [Duplicate IP in one party?] attachrid .@origin; // for IP check set .@party_list$, ""; set .@done_list$, ""; set .@dupli, 0; // Check Party Members for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if (isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) == 0) continue;{ attachrid $@partymemberaid[.@i]; query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + $@partymemberaid[.@i] + "", .@ipd$); // If same IP is on party if(compare(.@party_list$, "|" + .@ipd$ + "|" ) == 1) { set .@dupli, 1; } else // Add IP to party list for checking .@party_list$ += "|" + .@ipd$ + "|"; // If acc has entered ladder if (compare( .en_acc_list$, "|" + getcharid(3,strcharinfo(0)) + "|" ) == 1) { if(.@done_list$ == "") .@done_list$ += strcharinfo(0); else .@done_list$ += ", " + strcharinfo(0); } } } // Get back to PTL to display message attachrid .@origin; if(.@dupli) { mes "Sorry, party members with the same IP address can't enter."; close; } if(.@done_list$ != "") { mes "Sorry, the following people has already entered the ladder today:"; mes .@done_list$; close; } // END OF NEW CHECK else if ( $@partymembercount != .register_min ) { mes "[Quistis Trepe]"; mes "You have to form a party with exactly "+ .register_min +" different classes members to play."; close; } else if ( .@online != .register_min ) { mes "[Quistis Trepe]"; mes "Your party must have "+ .register_min +" members online on map '"+ strnpcinfo(4) +"'."; close; } else if (countitem(34207) < 15) { mes "[Quistis Trepe]"; mes "You don't have 15 vote coins. Please come back when you do."; close; } // PTL has 5 miths, check for other pt members else if (countitem(34207) > 14) { for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { attachrid $@partymemberaid[.@i]; if (countitem(34207) < 15) { attachrid .@origin; mes "[Quistis Trepe]"; mes "You don't have 15 Vote Points. Please come back when you do."; close; } } attachrid .@origin; } if ( .party_id ) { mes "[Quistis Trepe]"; mes "I'm sorry, but a party is currently playing the game. Please standby until the party is finished."; mes "Thank you."; close; } announce "The party ["+ strcharinfo(1) +"] has started the MvP ladder game.", bc_all; // Delete mithril coins for each PT member for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { attachrid $@partymemberaid[.@i]; delitem 34207,15; } attachrid .@origin; set .party_id, getcharid(1); set .@time_enter, gettimetick(2); for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == strnpcinfo(4) ) { announce "You have "+ .timeout +" minutes to complete "+ .totalround +" rounds.", bc_self; .@name$[.@c] = strcharinfo(0); .@c++; } } } cleanmap .eventmap$; warpparty .eventmap$, 0,0, .party_id, strnpcinfo(4); attachrid .@origin; mes "hello"; donpcevent strnpcinfo(0)+"::OnMvpDead"; sleep .timeout * 60000; if ( .round == .totalround +1 ) { getpartymember .party_id, 1; getpartymember .party_id, 2; mapannounce .eventmap$, "Congratulations... You were able to defeat all the MVPs!", bc_map; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + $@partymemberaid[.@i] + "", .@ipd$); if ( strcharinfo(3) == .eventmap$ ) getitem .finish_item_id, .finish_item_amount; query_sql( "INSERT INTO `bloody_branch` VALUES ("+.gui+", 1)"); .entered_list$ += "|" + .@ipd$ + "|"; .en_acc_list$ += "|" + getcharid(3,strcharinfo(0)) + "|"; } } set .@rid , getcharid(3,strcharinfo(0)); addrid (2,0,getcharid(1)); //attach the rid of all players in the group set questdelay,gettimetick(2)+86400; //set the delay for all players in group detachrid; attachrid(.@rid); //so that the rest of the script will only run on the party leader set .@timeused, gettimetick(2) - .@time_enter; if ( .bonus_item_amount && .@timeused < .bonus_time * 60 ) { mapannounce .eventmap$, "You are rewarded a bonus item for completing the ladder within "+ .bonus_time +" minutes.", bc_map; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == .eventmap$ ) getitem .bonus_item_id, .bonus_item_amount; } } } if ( !$mvpladdderparty_time || .@timeused < $mvpladdderparty_time ) { mapannounce .eventmap$, "And you broke the record! [ "+( .@timeused / 60 )+" min "+( .@timeused % 60 )+" sec ]", bc_map; set $mvpladdderparty_time, .@timeused; set $mvpladdderparty_name$, getpartyname( .party_id ); copyarray $mvpladderparty_member$, .@name$, .register_min; } else mapannounce .eventmap$, "Time used [ "+( .@timeused / 60 )+" min "+( .@timeused % 60 )+" sec ]", bc_map; sleep 10000; announce "Player ["+ .@name$ +"] of the party ["+ getpartyname( .party_id ) +"] has finished the Bloody Branch Quest!", bc_all; } else announce "Player ["+ .@name$ +"] of the party ["+ getpartyname( .party_id ) +"] has failed to finish the MvP ladder game.", bc_all; mapwarp .eventmap$, .map$, .x, .y; killmonsterall .eventmap$; .party_id = .round = 0; end; OnMvpDead: getpartymember .party_id, 1; getpartymember .party_id, 2; .round++; if ( .round >= 2 && .round != .totalround +1 && .round_item_amount ) { for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == .eventmap$ ) getitem .round_item_id, .round_item_amount; } } } if ( .round == .totalround +1 ) { awake strnpcinfo(0); end; } else if ( .round == .totalround ) mapannounce .eventmap$, "The final Round will begin in "+ .delay +" seconds...", bc_map; else mapannounce .eventmap$, "Starting round "+ .round +" in "+ .delay +" seconds...", bc_map; sleep .delay * 1000; if ( .mvpid[.round] == 1646 ) // pick random Bio3 MVP .mvpid[.round] = rand(1646,1651); monster .eventmap$,0,0, "--ja--", .mvpid[.round], 1, strnpcinfo(0)+"::OnMvpDead"; mapannounce .eventmap$, getmonsterinfo( .mvpid[.round], MOB_NAME ) +" has spawned!", bc_map|bc_blue; end; OnPCLogoutEvent: if ( hp > 0 ) .@less_one = 1; else end; OnPCDieEvent: if ( strcharinfo(3) != .eventmap$ || !getcharid(1) ) end; if ( getcharid(1) != .party_id ) end; getpartymember .party_id, 1; getpartymember .party_id, 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { attachrid $@partymemberaid[.@i]; if ( strcharinfo(3) == .eventmap$ && hp > 0 ) .@alive++; } } if ( .@less_one ) .@alive--; if ( !.@alive ) { mapannounce .eventmap$, "Party wiped!", bc_map; sleep 10000; awake strnpcinfo(0); } end; OnClock0000: set .entered_list$, ""; set .en_acc_list$, ""; query_sql "truncate table bloody_branch"; end; OnInit: set .entered_list$, ""; set .en_acc_list$, ""; // Configurations ----------------------------------------------------- // Time limit (in minutes) // When time runs out, all players inside the room will be kicked out. // Do NOT set this to zero! set .timeout, 30; // entrance fee (in Zeny) set .register_cost, 200000000; // exact amount of party members needed to start the game set .register_min, 2; // id of each mvp. you can add more setarray .mvpid[1], 1086,// Golden Thief Bug 64 // 1651,// H.Wizz 99 1115,// Eddga 65 1150,// Moonlight Flower 67 1159,// Phreeoni 69 1112,// Drake 70 1583,// Tao Gunka 70 1492,// Incantation Samurai 71 1046,// Doppelgangger 72 // 1649,// H.Priest 99 1252,// Garm 73 1418,// Evil Snake Lord 73 1059,// Mistress 74 1190,// Orc Lord 74 // 1646,// Lord Knight 99 1087,// Orc Hero 77 1251,// Knight of Windstorm 77 1038,// Osiris 78 // 1658,// Ygnizem 79 // 1647,// Assassin X 99 1272,// Dark Lord 80 1871,// Fallen Bishop 80 1039,// Baphomet 81 1147,// Maya 81 // 1650,// Sniper Cecil 99 1785,// Atroce 82 1389,// Dracula 85 1630,// Bacsojin 85 1885,// Gorynych 85 1623,// RSX 0806 86 1511,// Amon Ra 88 // 1648,// Whitesmith 99 1688,// Lady Tanee 89 1768,// Gloom Under Night 89 1719,// Datale 90 1734,// Kiel D-01 90 1157,// Pharaoh 93 1373,// Lord of Death 94 1312,// Turtle General 97 1779,// Ktullanux 98 1874,// Beelzebub 98 // 1646,// Bio3 placeholder 99 1708,// Thanatos 99 1751,// Valkyrie Randgris 99 1832;// Ifrit 99 // number of rounds (default: 39) //set .totalround, getarraysize(.mvpid) -1; set .totalround, 30; //if you want 35 rounds // item reward for completing each round // set .round_item_id, 607; // set .round_item_amount, 1; // item reward for completing the entire ladder set .finish_item_id, 12103; set .finish_item_amount, 20; // bonus reward if ladder completed within a certain time (in minutes) set .bonus_time, 15; // if completed within 15 minutes, this reward is given set .bonus_item_id, 12103; set .bonus_item_amount, 5; // time delay between rounds, in seconds (default: 3) set .delay, 3; // minimum GM level to reset the best record set .gmlvlreset, 99; // event map set .eventmap$, "cguild_vs22"; // mapflag configuration setarray .@mapflag, mf_nowarp, mf_nowarpto, mf_nosave, mf_nomemo, mf_noteleport, // mf_nopenalty, // disable exp loss mf_noreturn, // mf_nobranch, // mf_nomobloot, // disable monster drop loots, // mf_nomvploot, // 2 of these // mf_nodrop, mf_partylock; // Config Ends -------------------------------------------------------------- mapannounce .eventmap$, "An administrator has refreshed the server. Please re-register. We apologize for the inconvenience.", bc_map; getmapxy .map$, .x, .y, BL_NPC; mapwarp .eventmap$, .map$, .x, .y; killmonsterall .eventmap$; .@size = getarraysize( .@mapflag ); for ( .@i = 0; .@i < .@size; .@i++ ) setmapflag .eventmap$, .@mapflag[.@i]; //waitingroom"Bloody Branch Quest",0; end; } - script no_reins2 -1,{ OnPCLoadMapEvent: if (strcharinfo(3) == "cguild_vs22" && ismounting() ) { setmounting(); } } cguild_vs22 mapflag loadevent Now I'm not quite sure if I need to add another row into my table(maybe to record account_id?) CREATE TABLE IF NOT EXISTS `bloody_branch` ( `unique_id` int(11) unsigned NOT NULL default '0', `bloodybranch` varchar(30) NOT NULL default '', PRIMARY KEY (`unique_id`) ) ENGINE=MyISAM; I greatly appreciate any and all help.
  3. Sorry to bother you guys, how would I change the FluxCP donate module from insert an amount to like a dropdown box where they select the amount? Only asking because I'd like to give a bonus amount the higher the donate is. Like $10 = 1000 Cash points $30 = 3300 Cash Points $50 = 6000 Cash points
  4. Yeah, it's setup properly, and like I said, it's not like it doesn't read that the client is there, only when I have it set to run as admin will it load the client from START, such a weird thing.
  5. When pressing "START" on Thor Patcher, it just closes and does nothing, only way to get around this is to run as administrator, is there another way around this or do I need to go to an earlier version? I tried to search and found nothing.
  6. This doesn't hook all players on server to see if they have a variable or not, it's just the killer, so I was trying to use getunits and attachrid to read their variable and send them the dispbottom or not depending on the variable. Having a hard time getting the output for the script to push the dispbottom on them.
  7. I appreciate the help, hmm my wording can be bad sometimes, I'm sorry, but what I meant was so all players who have the variable see the dispbottom "player killed mvp blah" stuff. Like player A kills Maya in anthell02, Now as long as Player A has #mvpon >= 1, and Player B also has #mvpon >= 1 they will both get the dispbottom of dispbottom "[ System ] : Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" alone at "+ strcharinfo(3); but if player A has #mvpon >= 1 and player B has #mvpon <= 0, Player A will see that message but player B will not.
  8. Wouldn't this make the rest of the script not happen? I mean like the player won't get the rewards, the player won't get the message with how many mvp kills they got? I'd like for those things to still happen regardless of the variable. I guess I should've been more clear haha. The original script was an announcement, it's annoying to always have when an mvp dies get displayed in a high rate server(especially if your goal is pvp and not pve) , so basically my goal is to allow the player the choice on if they get the announcement in the form of a variable and dispbottom. The reason I'm choosing dispbottom in particular is because when a player has a chat box up announce goes into and fills the chatbox, so if the player is trying to buy or sell something or have a conversation it's not spamming on the players screens.
  9. I've tried getunits then atachrid but getting confused on how to get it to show the players who have the set variable(#mvpon <= 1) to recieve the dispbottom and if they have #mvpon <= 0 they don't get the dispbottom. - script #mvp_kill -1,{ OnInit: setarray .p_rwd, 607,1; // Party reward <item>,<amount> setarray .s_rwd, 607,1; // Solo reward <item>,<amount> .chance = 50; // Drop rate chances % // .gm = 10; // Prevents gm level and above to trigger the event // MVP Map list setarray .t_maps$[0],"moc_pryd06","lhz_dun03","gld2_prt","abbey02","ayo_dun02","lhz_dun04","ra_fild02","xmas_fild01","dic_dun02","beach_dun","iz_dun05","tur_dun04","lhz_dun02","jupe_core","moc_fild22","anthell02","odin_tem03","gon_dun03","gef_fild02","thana_boss","gef_fild10","ein_dun02","gef_fild14","moc_pryd04","dew_dun01","in_sphinx5","niflheim","moc_fild17","xmas_dun02","ice_dun03","kh_dun02","treasure02","moc_prydn2","pay_dun04","ra_san05","mosk_dun03","ama_dun03","thor_v03","gef_dun01","mjolnir_04","abyss_03","dic_dun03","prt_sewb4","pay_fild11","gef_dun02","gl_chyard","ra_fild03","ra_fild04","ve_fild01","ve_fild02","lou_dun03","prt_maze03","bra_dun02"; end; OnNPCKillEvent: //if (getgmlevel() >= .gm ) end; // If gm = event wont happen if ( getmonsterinfo( killedrid, MOB_MVPEXP )) { for (.@a = 0; .@a < getarraysize(.t_maps$); .@a++) { if ( strcharinfo(3) == instance_mapname("06guild_01") ) end; if ( strcharinfo(3) == instance_mapname("force_1-1") ) end; if ( strcharinfo(3) == .t_maps$[.@a]) { if ( getcharid(1) ) { getpartymember getcharid(1), 1; getpartymember getcharid(1), 2; for ( .@i = 0; .@i < $@partymembercount; .@i++ ) { if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) { .@partymemberaid[.@c] = $@partymemberaid[.@i]; .@c++; } } if (rand(100) < .chance) getitem .p_rwd[0], .p_rwd[1], .@partymemberaid[ rand( .@c ) ]; dispbottom "[ System ] : Player ["+ strcharinfo(0) +"] of party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3); } else { if (rand(100) < .chance) getitem .s_rwd[0], .s_rwd[1]; dispbottom "[ System ] : Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" alone at "+ strcharinfo(3); } MVPKills = MVPKills+1; dispbottom "---------------------------------------------------"; dispbottom "You killed a total of "+MVPKills+" MVP"+((MVPKills == 1)?"":"s")+"."; dispbottom "---------------------------------------------------"; end; } } if ( getcharid(1) ) { dispbottom "[ System ] : Player ["+ strcharinfo(0) +"] of party ["+ strcharinfo(1) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" at "+ strcharinfo(3); } else { dispbottom "[ System ] : Player ["+ strcharinfo(0) +"] has killed "+ getmonsterinfo( killedrid, MOB_NAME ) +" alone at "+ strcharinfo(3); } end; } }
  10. Thanks @Emistry, sorry for the late reply. I actually found this out yesterday haha. Been trying to experiment with it. I think I got my idea basically done, but there's a few things about what I'm trying to do, and my limited knowledge with scripting. So I'd like to ask, basically my current script I have it so the previous npc keeps a mes window up on the players screen using sleep until the next npc talks over it. Is there a way to have the player not be able to click off the unit walk? Like how when a mes window is on the screen they can't click on anything. Here's the basic example of my script. prontera,153,175,5 script test 757,1,1,{ Ontouch: atcommand "@speed 50"; mes "blah blah blah?"; close2; mes ""; unitwalk getcharid(3),153,165; //Start moving on guide. sleep 1000000000; end; } prontera,154,165,5 script connecting npc -1,1,1,{ OnTouch: unitwalk getcharid(3),1153,155; } prontera,153,154,5 script ending test npc 757,1,1,{ Ontouch: atcommand "@speed 100"; mes "blah2 blah2 blah2"; close2; end; } Now if you fill in the blanks you'll see how the script functions, is there a way to stop the player from clicking on npc or during Unitwalk without the mes window staying up on their screen? Pcblock move stops them from moving in general, even by force of script. I am using other pcblock to stop commands and sit/stand And I am not knowledgeable enough with source edit to change this. Or is my solution to my problem sufficient? Thanks for any insight you can give
  11. Hello everyone, I don't know if this would be hard, but wanted to create a script that when a new account goes into a map for the first time a message comes up and asks the player if they would like a guide. Then if they do, it makes them walk from the spot of @go 0 to the next npc in the guide who will then talk to them upon arrival, then again ask if they want to continue the guide and if they do the script makes the player walk to the next NPC, kind of like how in Pokemon games the games walks around with you in pallet Town and tells you about the town and he talks after moving. But the script moves the p[layer without them having any control. Also if the player wants to redo the guide he talks to the NPC and it'll allow the player to restart the guide. If the player goes through the guide they will be rewarded with an item, but if they already have been rewarded they don't get them again. I'm honestly not sure the extent of scripting, so I don't know if this is a doable thing. I would greatly appreciate any help on this.
  12. @Emistry thank you for the fast reply, I'm sorry, I'm not following what you're saying, how do I make it so when someone dies in pvp it drops the fake accounts skull? So I go into my sql database and make a dummy account and make a character named dummy, now when I kill Fred, how do I get it to say dummys skull rather than Fred's skull? Or how to create a script that'll make the named skull someone else?
  13. So to explain what I mean, I'd like to have a script look for all named player skull on player and rename it to something like pvps skull or people's skull. So it doesn't take up multiple slots and gets mashed into one slot. Bonus if it can search the players storage and ask if they'd like the skulls on them or in storage. Unless I'm missing something and there's a way to make all skulls dropped from players be the same skull name so they don't take up a ton of slots.
  14. @Alzhea Once again I appreciate your help, I understand what you're doing, just wasn't sure how to execute it, I haven't scripted in a long time so trying to get back into the swing of things.
  15. @Alzhea I appreciate you taking the time out of your day to help me, but TRUNCATE did not work, instead I was able to muster up using query_sql( "DELETE FROM `chain_quest` WHERE `daily` = '1'" ); to delete the entries. Thank you very much! I do have another question, how would I add 2 checks? Like 1 check be unique ID and the other be ip? So it checks unique ID and ip, and when completing the quest, it gives daily =1? If I added an ip table, would it be create this and do a check like we do with unique ID? Like this? .lip = last_ip (); .@ip = query_sql("SELECT `daily` FROM `chain_quest` WHERE `last_ip` = "+.lip+" LIMIT 1", .@chain);
  16. Just use this And edit the classes with stats and change the cases to the items you want to give. Like switch "swordsman" to "strength"
  17. So in my server, we're running the mvp ladder from Annieruru. Now in the MvP Ladder, we have a few mvps that randomly cause client crashing and can't figure out the cause. Here a crash log, any help would be appreciated. BTW, these crashes don't happen outside of the MvP Ladder event. game_crash_log.txt
  18. Wow, thanks for the fast reply BeWan, Honestly, I'm having trouble getting it to hold and remove basic variables haha, here's a crack at it, but I'm stuck from here(also probably a few errors). // NPC Name must have a Number behind it. ex Name#1 , Name#2,... prontera,155,181,5 script Chained Quest#1 757,{ .gui = get_unique_id (); .sqls = query_sql( "SELECT `variable_storage`, `unique_id` from `chain_quest`, .@chain, .@uid ); .sqlu = query_sql( "UPDATE `chain_quest`, SET `variable_storage` = 1 ); function ChainedQuest; mes "I am a Chained Quest NPC, you can only redo the previous Quest after you have finished all of my Quests."; next; // Quest Setup : // ChainedQuest( Reward,Amount , Required Zeny, {Item1,Amount1,Item2,Amount2,...} ); switch( getd( "Quest"+strnpcinfo(2) ) ){ Case 0: ChainedQuest( 5001,1, 10000, 607,10 ); Case 1: ChainedQuest( 5002,1, 15000, 607,20, 608,20 ); Case 2: ChainedQuest( 5003,1, 20000, 607,30, 608,30, 7539,30 ); // Case 3: ChainedQuest( 5004,1, 25000, 607,40, 608,30, 7539,40 ,501,10 ); // Case 4: ChainedQuest( 5005,1, 30000, 607,50, 608,30, 7539,50 ,501,10 ,502,10 ); // Case 5: ChainedQuest(....); // Case 6: ChainedQuest(....); default: mes "Congratulation ,You have finished all the Quest i gave you, you may Re-Do if you want."; set getd( "Quest"+strnpcinfo(2) ),0; close; } OnPCLoadMapEvent: showevent 1,0; end; if (.@chain = 1) { mes "You have already completed this quest today, come back tomorrow"; close; function ChainedQuest { for( set .@i,3; getarg( .@i,0 ) != 0 ; set .@i,.@i + 2 ){ if( countitem( getarg( .@i ) ) < ( getarg( .@i + 1 )) ){ mes "[ ^FF0000Part "+( getd( "Quest"+strnpcinfo(2) ) + 1 )+"^000000 ]"; mes "^00FF00_______________________________^000000"; mes "^FF0000Reward^000000 : "+getarg(1)+" x ^0000FF"+getitemname( getarg(0) )+"^000000"; mes "^00FF00_______________________________^000000"; mes "then bring me those items :"; mes "^00FF00_______________________________^000000"; mes ( Zeny < getarg(2) ? "^FF0000":"^0000FF" )+getarg(2)+" Zeny^000000"; for( set .@a,3; getarg( .@a,0 ) != 0 ; set .@a,.@a + 2 ){ mes (( countitem(getarg( .@a )) < ( getarg(.@a + 1 )) )? "^FF0000[ "+countitem(getarg(.@a))+" / "+(getarg(.@a+1)):"^0000FF[ "+getd( "Quest"+strnpcinfo(2) ) )+" ] "+getitemname(getarg(.@a))+"^000000 "; } close; } } if( Zeny < getarg( 2 ) ){ mes "You required "+getarg( 2 )+" Zeny."; close; } mes "[ ^FF0000Part "+( getd( "Quest"+strnpcinfo(2) ) + 1 )+"^000000 ]"; mes "Look's like you have collected all"; mes "^FF0000_______________________________^000000"; mes ( Zeny < getarg(2) ? "^FF0000":"^0000FF" )+getarg(2)+" Zeny^000000"; for( set .@i,3; getarg( .@i,0 ) != 0 ; set .@i,.@i + 2 ){ mes "^FF0000"+getarg( .@i+1 )+" x ^0000FF "+getitemname( getarg( .@i ) )+"^000000"; } next; if( select("^0000FFContinue^000000:Cancel") == 2 ){ mes "Okay..as you wish ~ come back again when you do continue it."; close; } for( set .@i,3; getarg( .@i,0 ) != 0 ; set .@i,.@i + 2 ){ delitem getarg( .@i ),getarg( .@i + 1 ); } set Zeny,Zeny - getarg( 2 ); set getd( "Quest"+strnpcinfo(2) ),getd( "Quest"+strnpcinfo(2) ) + 1; mes "You will be rewarded with "; mes "^0000FF_______________________________^000000"; mes "^FF0000"+getarg(1)+"^000000 x ^0000FF"+getitemname( getarg(0) )+"^000000"; mes "^0000FF_______________________________^000000"; getitem getarg(0),getarg(1); .sqlu; close; } } OnClock0000; query_sql("UPDATE `chain_quest` SET `variable_storage` = '0'"); addrid(0); chain = 0; end; prontera mapflag loadevent CREATE TABLE IF NOT EXISTS `chain_quest` ( `unique_id` int(11) unsigned NOT NULL default '0', `variable_storage` varchar(30) NOT NULL default '', PRIMARY KEY `unique_id` (`unique_id`) KEY `variable_storage` (`variable_storage`) ) ENGINE=MyISAM;
  19. So I was wondering how to add Gepard UniqueID, have it reset OnClock0000 and remove the Zeny requirement? I've been trying to tinker with it to no avail, It's been awhile since I scripted(8 years?), so I don't remember much and it's like starting all over again.
  20. Hi @Emistry Sorry to be a bother to you. I just came back from a long hiatus of scripting(8 years) and don't remember much. Would you mind assisting me in adding Gepard UniqueID to this and have it reset OnClock0000? I've been messing around but to no avail.
  21. Problem has been solved. Thanks all for assisting in this. Accidently had NPC set to pointshop and used #cashpoints rather then a cashshop. My bad.
  22. Even though it takes 100 cash points away on buy? Maybe I didn't explain the bug properly... So I start out with 0 cash points Use 1 TCG card(gives me 100 cash points) Buy item for 100 cash points(now I'm at 0 again) Use TCG card again and now I'm at 200 cash points(rather then the 100 I'm supposed to be at) Yes this is own script. But if it removes the cash points I'd assume it works right, just don't understand how they are becoming +100 net positive on cash points only after buying an item.
×
×
  • Create New...