Jump to content

Takuyakii

Members
  • Posts

    207
  • Joined

  • Last visited

Everything posted by Takuyakii

  1. i tried but if i use @fakename, they can't invite him into party. or guild nor duel.
  2. Thank you sir, i tryd to searched and found out about something so i did query_sql "UPDATE `char` SET name='[Dark Army] "+ escape_sql(.@charname$) + "' WHERE `char_id`='"+getcharid(0)+"'"; and now its working, now i have a second problem, how can i maintain their original name? i would just like if they change name their original name will still exist, but in front of original name "Dark army" will show. [Dark Army] Takuyakii. Sorry for my title i just don't know what should i wrote. again sorry Sir.
  3. Hello, can someone help me make this work ? query_sql "UPDATE `char` SET name='[Dark Army] "+ escape_sql(@charname$) + "' WHERE `char_id`="+escape_sql(@charid$)+""; i have an npc that can change your name, but the sql script not working. i found that sql wayback 2013 i gueess,
  4. Good day, can someone correct this script i have npc that giving a farm title System ( Farmer 1, Farmer 2 titled) i want to make if the player logged in it needs to check if his farmer 1 or farmer 2, ) so i try to wrote this. if farmer 1, he/she will be put tittled or fakename on his name, PS: i don't know if my title is right if not please do correct ty - script testtitles -1,{ OnPCLoginEvent: if( Farm == 0) goto L_name; if (Farm == 1 ) goto L_nfarm; L_name: mes "Your not a farmer!"; end; L_farm: atcommand "@fakename" Farmer1 "+ strcharinfo(0); end; }
  5. Takuyakii

    Autopots

    https://github.com/rathena/rathena/blob/master/npc/custom/etc/autopot.txt
  6. Hello rA, can someone help me with these script? i'm trying to run my script and getting error getting confused with cases here's my script , im getting error on line 18, unexpected character. Thank you. //=======Event Changer ============ cast_town,160,180,6 script Event Handler 634,{ mes "[^880000Dungeon Assistant^000000]"; mes "Welcome, " + (Sex?"Mr.":"Mrs.") + " " + strcharinfo(0); mes "I am the Sexy Event Handler at this town~"; mes "How may i help you today?"; next; switch(Select("^000088Visit Shop^000000:Information")){ case 1: switch(Select(^000088Use Event Points^000000":Use Event Coins")){ next; case 1: close; callshop "eventpoints",1; end; } case 2: switch(Select(^000088Castle Drops^000000":Cards:Cancel")){ case 1: callshop "eventcastle",1; end; } case 2: callshop "eventcards",1; end; } } // ===== Shops ========= - pointshop eventpoints -1,#event_points,20018:10000,20193:12000,20326:12000,20351:11000 - pointshop eventcastle -1,#event_coins,20018:10000,20193:12000,20326:12000,20351:11000 - pointshop eventcard -1,#event_coins,20018:10000,20193:12000,20326:12000,20351:11000 EDIT: SOLVED BY USING MENU. THANKS!
  7. Thank you so much for giving me an idea, i will try to make this work, thank you again as always. Hi @Pride Can u help me with this one, ? instead of 1 time ticket = 3 hours and lifetime ticket = 1 day? then after that hours they or day they purchased it will be resetted and they need to pay again, prontera,171,170,4 script Monster Arena 648,{ cutin "arena_01",2; strt: mes "[^880000Arena Master^000000]"; mes "Good day ^008800"+strcharinfo(0)+"^000000 "; mes "How may i help you?"; switch(select("^000088Enter Arena^000000:Information")){ //==========================arena room======================= case 1: next; mes "[^880000Arena Master^000000]"; mes "Choose Arena Process"; next; menu "1 Time ticket",-,"Lifetime ticket",L_ticket; mes "[^880000Arena Master^000000]"; mes "Processing ticket..."; next; if(countitem(3618) < 1) goto L_Later; mes "[^880000Arena Master^000000]"; mes "1 Time ticket accepted"; mes "Lets go!.."; delitem 3618,1; announce "[Monster Arena] "+strcharinfo(0)+" Has Entered using 1 time ticket.",0,0xFF6600; warp "bat_b02" ,0,0; close; L_ticket: mes "[^880000Arena Master^000000]"; mes "Processing ticket..."; next; if(countitem(3619) < 1) goto L_Later; mes "[^880000Arena Master^000000]"; mes "Lifetime ticket accepted"; mes "Lets go!.."; announce "[Monster Arena] "+strcharinfo(0)+" Has Entered using Lifetime ticket.",0,0xFF6600; warp "bat_b02" ,0,0; next; goto strt; L_Later: mes "[^880000Arena Master^000000]"; mes "Dont waste my time!.."; next; goto strt; //==========================================information============================================== case 2: next; mes "[^880000Arena Master^000000]"; mes "Monsters Inside The Room:"; mes "^880000Arena Dark Kades^000000"; mes "^880000Arena Dark Pyuriel^000000"; next; mes "[^880000Arena Master^000000]"; mes "Mob Information"; mes "Element: ^880000Dark (lvl3)^000000"; mes "Size: ^880000Large^000000"; mes "Race: ^880000Demon^000000"; next; mes "[^880000Arena Master^000000]"; mes "MVP Inside The Room"; mes "MVP: ^880000King Poring^000000"; mes "Element: ^880000Dark (lvl3)^000000"; mes "Size: ^880000Large^000000"; mes "Race: ^880000Demon^000000"; next; goto strt; } }
  8. @Pride can u help me this one? sorry for tagging you.
  9. Takuyakii

    Rent npc

    Good day rA, can someone help me to make a script that ff: i don't know if my title is right, i just don't know what should i call it. 1. NPC that have will required you an item to enter the map Ex, Red potion. 2. it has option like 3 hours /1 day access for the map. 3. the player will automatically kick on that map. (not all player, example Player 1 just availed 3 hours, when the 3 hours come Player 1 will be kicked, and the other player 2 3 4 5 6 can stay because they need to use their availed access) i know this is to much to request because of this details. i also try to edit some script but im getting nowhere, Thank you.
  10. The best always, fixed by remove the account_id, thank you so much.
  11. Good day rA i don't know if this is the right section i been trying to fix this and already searched inside / outside on this forum. i'm still having this error, and this is my SQL query_sql("CREATE TABLE IF NOT EXISTS `woe_time_participation` (`castle_id` int(11) unsigned NOT NULL, `account_id` int(11) unsigned NOT NULL, `date` int(11) NOT NULL DEFAULT '0', `claimed` int(11) NOT NULL DEFAULT '0', PRIMARY KEY ( `castle_id`, `account_id`, `date` )) ENGINE=InnoDB"); see picture below
  12. already did, it always showing like this it supposed to be full hp then per hit should be reduce the hp. anyway i dont know if this is about script or the client, but thank you for helping me, +1
  13. Well this idea or script are from herc. https://board.herc.ws/topic/15975-custom-unit-hp-bar-system/ this is the script or the actual.
  14. Wow thank you it works, no error on map now! but can i ask question why the cutin are not properly working on this script? thanks. it supposed to when i attack the monster the cutin should move by the monster hp?
  15. Fixed removed . on getunitdata, now there's a new error
  16. @Pride Line 26 Changed into this after that there's no error on map but when im talking to npc to summon the monster, i got this error buildin_getunitdata: Error in Argument! Please give a variable to store value in .@U_MAXHP = getunitdata (.@mid, UMOB_MAXHP); while (.@HP_Bar != 0) { .@U_HP = getunitdata (.@mid, UMOB_HP); .@P_HP = (.@U_HP*100)/.@U_MAXHP;
  17. Tested and put some ( ) under .@mid because of the error, then after that igot the same error buildin_getunitdata: Error in Argument! Please give a variable to store value in
  18. Good day! Can someone help me, to fix this error ? buildin_getunitdata: Error in Argument! Please give a variable to store value in Script: refer to this link: https://board.herc.ws/topic/15975-custom-unit-hp-bar-system/
  19. check sadder hunting mission
  20. Good day rA, can some one translate this into compatibility of rathena? 1. i want this to be a normal npc daily quest npc. 2. 24 hours cool down Thank you! Here's the code from herc //===== Hercules Script ==================================================================== // Automatic Trivia Event //===== Originally initiated By: =========================================================== // Capuche http://rathena.org/board/user/5984-capuche/ //===== Changed By: ======================================================================== // Habilis //===== Current Version: =================================================================== // 1.5 //===== Compatible With: =================================================================== // Hercules //===== Description: ======================================================================= //- Enhanced version of facts auto event. The Event is announced. The NPC asks 10 random //- questions from a question bank. Players have to write the answer to the main chat. //- Players don't need to worry about CAPITAL letters. //- 1) Question is asked by the NPC. //- 2) If there is no answer after 15 seconds NPC will give a hint. //- 3) IF there is still no answer after a hint, the question is skipped. //- 4) If the right answer is given, player is announced and reward is given //========================================================================================== //=====From eAthena to rAthena to Hercules================================================== //==========Without this original author, this script will never exist====================== //========Original author Credits=========================================================== //=====================================================DONT================================= // ToastOfDoom ================================================REMOVE======================= // RxChris =========================================================THIS================ // Hellflaem ================================================================CREDIT======= //========================================================================================== //========================================================================================== - script Trivia_Auto_Event FAKE_NPC ,{ OnMinute18: //OnEventStart: // Make the NPC appear so that players can begin to gather around // and perhaps read the rules enablenpc "Trivia#main"; .@nbAnnounce = 3; // How many times announce event with minute intervals while( .@nbAnnounce > 0 ) { announce "The Trivia Event will begin south of Prontera in " + .@nbAnnounce + " minute(s).",bc_all | bc_blue; .@nbAnnounce--; sleep 60000; } announce "The Trivia Event has begun!",bc_all | bc_blue; donpcevent "Trivia#main::OnEventBegin"; end; OnStop: OnEventTimeOut: disablenpc "Trivia#main"; end; OnInit: disablenpc "Trivia#main"; end; } prt_fild08,137,365,6 script Trivia#main 4_F_JOB_ASSASSIN,{ OnTalk: mes "[^0055FF ::: Trivia ::: ^000000]"; mes " "; mes "Very simple event!"; mes " "; mes "I will be asking random questions."; mes " "; mes "All you have to do is shout the answer in the main chat!"; mes " "; mes "Do not worry about the capital letters, I can recognize the right answer, when I see one ;)"; mes "Worry about the spelling though."; close2; end; function DefineQuestion; function GetQuestion; function GetAnswer; function GetHint; OnEventBegin: L_loop: do { .@i = rand(.numQuestions); // Randomly picks a fact. } while(.already_asked[.@i]); .already_asked[.@i] = true; if( !.count ) { npctalk "Please answer all my questions:"; sleep 2000; npctalk "If your answer is correct, you will obtain prizes!"; } .count++; sleep 4000; npctalk "[" + .count + "/" + .max_questions + "] " + GetQuestion(.@i); defpattern 1, "([^:]+):.*\\s" + GetAnswer( .@i ) + "(.*)", "Right"; .Ans$ = GetAnswer( .@i ); .Hint$ = GetHint( .@i );; activatepset 1; initnpctimer; end; OnTimer15000: npctalk "[Hint] : " + .Hint$; end; OnTimer30000: npctalk "Sorry, You took too long to answer."; callsub L_continue; end; Right: npctalk "Correct, " + strcharinfo(0) + "! The answer is " + .Ans$ + "."; // Winner gets reward in Zeny //Zeny += 1000000; // Alotta bax ;) // Winner gets reward in Item //getitem 607, rand( 1,10 ); // Randomly picks from 1 to 10 607 --Ygg berry~ . // Winner gets reward in Points .@pointsWon = rand(.minPoints,.maxPoints); #LROEVENTPOINTS = #LROEVENTPOINTS + .@pointsWon; dispbottom .ServerName$ + " : You won " + .@pointsWon + " event points."; L_continue: deletepset 1; stopnpctimer; if( .count < .max_questions ) { callsub L_loop; // loop 10 questions } .count = 0; // end of event .Q_session = 0; npctalk "That's all for now. Thanks for participating in this event ^^"; deletearray .already_asked, getarraysize(.already_asked); emotion e_thx; sleep 2000; disablenpc "Trivia#main"; end; function DefineQuestion { .@a = .numQuestions % 128; .@b = .numQuestions / 128; setd(".question_" + .@a + "$[" + .@b + "]", getarg(0)); setd(".answer_" + .@a + "$[" + .@b + "]", getarg(1)); setd(".hint_" + .@a + "$[" + .@b + "]", getarg(2)); .numQuestions = .numQuestions + 1; return; } function GetQuestion { return getd(".question_" + (getarg(0) % 128) + "$[" + (getarg(0) / 128) + "]"); } function GetAnswer { return getd(".answer_" + (getarg(0) % 128) + "$[" + (getarg(0) / 128) + "]"); } function GetHint { return getd(".hint_" + (getarg(0) % 128) + "$[" + (getarg(0) / 128) + "]"); } OnInit: .ServerName$ = "[Your boring server]"; .minPoints = 10; .maxPoints = 25; .max_questions = 10; // 10 questions if more than 10 questions are defined DefineQuestion("When you create a character in this game, how many primary stats are there?","6", "STR, AGI, VIT, INT, DEX, LUK"); DefineQuestion("Wizard skill Water Ball can only be cast over deluge or ____?", "water", "It is liquid."); DefineQuestion("Which item is required to create a guild?", "emperium", "An Emperial item"); DefineQuestion("which skill is beneficial to the living and damaging to the undead?", "heal", "It restores health."); DefineQuestion("In which town Thieves guild is located?", "morocc", "A town in the sorgat desert."); DefineQuestion("In which town Merchants guild is located?", "alberta", "It's a portuary town."); DefineQuestion("In which town Archers guild is located?", "payon", ""); DefineQuestion("What property do Izlude dungeon monsters possess?", "water", "It is liquid."); DefineQuestion("What status can be inflicted with the Hammer Fall skill?", "stun", "Did I see the stars around your head?"); DefineQuestion("How much Zeny one Jellopy is worth?", "3", "Just get it from a Poring."); DefineQuestion("Which town has the most Dancers?", "comodo", "An island in the warm waters."); DefineQuestion("How many different poring-like monsters you can meet near prontera, including mini bosses?", "9", "poring, drops, poporing, marin, santa poring, mastering, angeling, arcangeling, ghostring"); DefineQuestion("What property counters best the water property?", "wind", "It's Blowing"); DefineQuestion("What property counters best the undead property?", "holy", "Perhaps an acolyte or a priest can tell you?"); DefineQuestion("What kind of food both Vanilmirth and Christmas Goblin like?", "scel", "Yellow jeloppy"); DefineQuestion("How many cities are in Rune-Midgrad kingdom?", "11", "Prontera, Izlude, Jawaii, Geffen, Payon, Morocc, Alberta, Comodo, Umbala, Al De Baran, Lutie"); DefineQuestion("What city is the capital of Rune-Midgrad kingdom?", "prontera", "The most central town of all."); DefineQuestion("Which food is able to fully restore health and mana? _________ _____", "yggdrasil berry", "A berry growing on the most majestic tree!"); DefineQuestion("Which one of those is the fastest weapon type? Sword, Dagger, Staff, Mace", "dagger", "Something that has to do with the length of the blade."); DefineQuestion("Which one of those id the cheapest? Jellopy Large Jellopy Royal Jelly Honey", "jellopy", "Dropped by Porings."); DefineQuestion("Which monster drops a pet taming item to tame Deviruchi?", "joker", "Why so serious?"); if( .numQuestions < .max_questions ) .max_questions = .numQuestions; end; }
  21. Can someone re convert this into new or any compatibility because this is so old files. Please help me Thank you <?php if (!defined('FLUX_ROOT')) exit; $title = Flux::message('ServerStatusTitle'); $cache = FLUX_DATA_DIR.'/tmp/ServerStatus.cache'; if (file_exists($cache) && (time() - filemtime($cache)) < (Flux::config('ServerStatusCache') * 600)) { $serverStatus = unserialize(file_get_contents($cache)); } else { $serverStatus = array(); foreach (Flux::$loginAthenaGroupRegistry as $groupName => $loginAthenaGroup) { if (!array_key_exists($groupName, $serverStatus)) { $serverStatus[$groupName] = array(); } $loginServerUp = $loginAthenaGroup->loginServer->isUp(); foreach ($loginAthenaGroup->athenaServers as $athenaServer) { $serverName = $athenaServer->serverName; $sql = "SELECT COUNT(char_id) AS players_online FROM {$athenaServer->charMapDatabase}.char WHERE online > 0"; $sth = $loginAthenaGroup->connection->getStatement($sql); $sth->execute(); $res = $sth->fetch(); $serverStatus[$groupName][$serverName] = array( 'loginServerUp' => $loginServerUp, 'charServerUp' => $athenaServer->charServer->isUp(), 'mapServerUp' => $athenaServer->mapServer->isUp(), 'playersOnline' => intval($res ? $res->players_online : 0) ); } } $fp = fopen($cache, 'w'); if (is_resource($fp)) { fwrite($fp, serialize($serverStatus)); fclose($fp); } } $online = "<img src='".$this->themePath('img/online.png')."' alt=\"Online\"/>"; $offline = "<img src='".$this->themePath('img/offline.png')."' alt=\"Offline\"/>"; ?> <?php foreach ($serverStatus as $privServerName => $gameServers): ?> <?php foreach ($gameServers as $serverName => $gameServer): ?> <div style="width:100%; height:100%; margin:0 auto;"> <div class="online_count"> <table width="100%" border="0"> <tr> <td align="center"> <p style="font-size:35px; margin-top:0px; font-weight:normal; font-family:'Visitor TT2 BRK'" align="center"> <?php echo $gameServer['playersOnline'] ?> </p> </td> </tr> </table> </div> <div class="online_peak"> <table width="100%" border="0"> <tr> <td align="center"> <font style="font-size:12px; font-weight:normal; font-family:'Visitor TT2 BRK'; color:#00CCFF;"><?php include('highest_peak.php'); ?></font> </td> </tr> </table> </div> <div class="server_time"> <table width="100%" border="0"> <tr> <td align="center"> <font style="font-size:12px; font-weight:normal; font-family:'Visitor TT2 BRK'; color:#CCC;"><?php include('status_time.php'); ?></font> </td> </tr> </table> </div> <div style="position:absolute; margin-left:285px; height:40px; width:200px; border:none;"> <div class="char"><?php if ( $charserver[0] == $online ) { echo $online; } else { echo $offline; } ?></div> <div class="map"><?php if ( $mapserver[0] == $online ) { echo $online; } else { echo $offline; } ?></div> <div class="login"><?php if ( $loginserver[0] == $online ) { echo $online; } else { echo $offline; } ?></div> </div> </div> <?php endforeach ?> <?php endforeach ?>
  22. Solved. please close this threads thank you.
  23. Good day rA, can someone help me to fix this error about query? i already googled some and fix the other error but this error, i can't fix it MYSQLI_FETCH_ARRAY() EXPECT PARAMETER 1 to be MYSQLI_Result object given below is my code <?php if (!defined('FLUX_ROOT')) exit; ?> <?php //SQL Connection function Connection() { $db_host="127.0.0.1"; //insert the IP Address of your website $db_name="rathena"; //insert your database name insid the 2 double quotesS $username="zxc"; //insert the username of your phpmyadmin (SQL username) $password="zxc"; //insert the password of your phpmyadmin (SQL password) $conn = mysqli_connect($db_host,$username,$password); if (!$conn) { echo "Connection failed!"; return false; } mysqli_select_db($conn, $db_name); return $conn; } $conn = Connection(); if ($conn) { $hpsql = mysqli_query($conn, "SELECT * FROM cp_onlinepeak ORDER BY users DESC LIMIT 1"); $hprow = mysqli_fetch_array($conn,$hpsql); echo $hprow['users']; }
×
×
  • Create New...