MikZ
-
Content Count
461 -
Joined
-
Last visited
Reputation Activity
-
-
MikZ reacted to meko in SCRIPT ERROR (MULTI CURRENCY SHOP)
.@num$ = .@num % (10 ** (.@i + 1)) / (10 ** .@i) + .@num$; // x = (y mod (10 ** (z + 1)) / (10 ** z)) // x = y mod 10 // this means it can be simplified to: .@num$ = (.@num % 10) + .@num$; but I believe your original script had an error because it uses both .@num and .@num$
-
MikZ reacted to bWolfie in DUNGEON RECORD TIME
Before I start, I need to let you know a few things about my potential solution.
I have never tried this before. I don't know how initnpctimer() interacts with instance NPCs. I don't have time to test. This might help you get started / understanding the process. // Add this NPC script to the OrcsMemory.txt instance script. 2@orcs,1,1,0 script Orcs_Memory_Timer FAKE_NPC,{ end; } /************* * Notes ************** Immediately after the instance is created, add this line below it: initnpctimer("Orcs_Memory_Timer"); I don't know how the Orc's Memory instance ends, but when it ends (maybe you need to add an event for when the mob is killed), add these lines: stopnpctimer("Orcs_Memory_Timer"); .@time = getnpctimer("Orcs_Memory_Timer") / 1000; if (.@time < $Orcs_Memory_Record) { // This next bit will display time as 00:00:00 format .@hour$ = .@time % (24*60*60) / (60*60) + ""; .@min$ = .@time % (24*60*60) % (60*60) / (60) + ""; .@sec$ = .@time % (24*60*60) % (60*60) % (60) + ""; .@time$ = "" +(getstrlen(.@hour$) == 1 ? "0" : "")+ "" + .@hour$ + ":" +(getstrlen(.@min$) == 1 ? "0" : "")+ "" + .@min$ + ":" +(getstrlen(.@sec$) == 1 ? "0" : "")+ "" + .@sec$ + ""; announce("The " + getpartyname(CHAR_ID_PARTY) + " party cleared the dungeon in " + .@time$ + ", a new record!", bc_all); $Orcs_Memory_Record = .@time; } You will need to set the $Orcs_Memory_Timer to something really high before the first party does the instance. This is so the first party to clear the dungeon will be the first record. I advise going in-game and using the following atcommand: @set $Orcs_Memory_Timer 1000000000 (that's 1 billion seconds lol) *************/ -
MikZ reacted to bWolfie in DUNGEON RECORD TIME
First create a table, perhaps called orcs_memory
Btw, this is just off the top of my head. I cannot confirm works.
Create table with the following columns: party_id (needs to be integer) party_name (needs to be string) time (needs to be string) Then, the moment your instance completes, you can the add following script: .@PID = getcharid(CHAR_ID_PARTY); .@PN$ = getpartyname(.@PID); .@time$ = ...(I wrote in the last post how to get this) query_sql("INSERT INTO `orcs_memory` VALUES (" + .@PID + ", '" + escape_sql(.@PN$) + "', '" + .@time$ + "')"); And then for your npc, the sql query: prontera,150,150,3 script Orcs Memory Rank CLEAR_NPC,{ query_sql("SELECT `party_name`, `time` FROM `orcs_memory` ORDER BY `time` ASC LIMIT 10", .@pname$, .@rank$); mes("Orcs Memory Rank"); for (.@i = 0; .@i < getarraysize(.@rank$); ++.@i) mes("" + .@pname$[.@i] + " - " + .@rank$[.@i] + ""); close; }
-
MikZ reacted to meko in @JAIL SOURCEMOD LOCATION
src/map/atcommand.c
but I would recommend doing it through a plugin rather than modifying vanilla source, else it makes updating harder because you have a bunch of git conflicts to fix
-
MikZ reacted to meko in ZENY * #Kill
You don't need to use SQL at all for this; it can all be done in the script engine:
// this assumes the target player is online and those variables are filled: // .@char_name$ // .@account_id // .Rates mesf("Are you sure you want to bail %s out of jail?", .@char_name$); next(); if (select("Confirm", "Cancel") == 1) { .@kill_counter = getvariableofpc(KILL_COUNTER, .@account_id); .@cost = .Rates * .@kill_counter; if (Zeny < .@cost) { mes("You didn't have enough Zeny."); } else { Zeny -= .@cost; mes("Kabooom!"); } } close; OnPCKillEvent: if (readparam(BaseLevel, killedrid) < 50) { ++KILL_COUNTER; } end;
-
MikZ reacted to meko in ZENY * #Kill
// this assumes the target player is online and those variables are filled: // .@char_name$ // .@account_id // .Rates .@kill_counter = getvariableofpc(KILL_COUNTER, .@account_id); .@cost = .Rates * .@kill_counter; mesf("Are you sure you want to bail %s out of jail for %d zeny?", .@char_name$, .@cost); next(); if (select("Confirm", "Cancel") == 1) { if (Zeny < .@cost) { mes("You didn't have enough Zeny."); } else { Zeny -= .@cost; // remove zeny set(getvariableofpc(KILL_COUNTER, .@account_id), 0); // reset counter to zero // {{ ADD YOUR UNJAILING LOGIC HERE }} mes("Kabooom!"); } } close; OnPCKillEvent: if (readparam(BaseLevel, killedrid) < 50) { ++KILL_COUNTER; // increase the kill counter // {{ ADD YOUR JAILING LOGIC HERE }} } end;
-
MikZ reacted to Dastgir in @autoattack specific map
ACMD(autoattack)
{
if (sd->bl.m != map->mapname2mapid("gold_room_map_name")) {
clif->message(fd, "AutoAttack cannot be used on this map.");
return false;
}
if (sd->sc.option & OPTION_AUTOATTACK) {
sd->sc.option &= ~OPTION_AUTOATTACK;
unit->stop_attack(&sd->bl);
clif->message(fd, "Auto Attack OFF");
} else {
sd->sc.option |= OPTION_AUTOATTACK;
timer->add(timer->gettick()+200, autoattack_timer, sd->bl.id, 0);
clif->message(fd, "Auto Attack ON");
}
clif->changeoption(&sd->bl);
return true;
}
-
MikZ reacted to Secrets in Unlimit Ranger Skill Status Adjust
battle.c around line 495x
Adjust the damage amp formula here
For your case, change the 50 to 25.
if( sc && skill_id != PA_SACRIFICE && sc->data[SC_UNLIMIT] && (wd.flag&(BF_LONG|BF_MAGIC)) == BF_LONG) { switch(skill_id) { case RA_WUGDASH: case RA_WUGSTRIKE: case RA_WUGBITE: break; default: ATK_ADDRATE( 50 * sc->data[SC_UNLIMIT]->val1 ); } } -
MikZ reacted to Kuya Jeo in AGI BASE SKILL Delay
Place it on your item script
script <"if(readparam(bAgi) >= 200) { bonus bDelayRate, "<SkilName>" , -100; }">
-
MikZ reacted to Dastgir in INCREASE ALL DAMAGE normal and skills
db/(pre-)re/map_zone_db.conf
Find the zone with name: "All"
Add These Mapflags:
mapflags: ( "weapon_damage_rate 200", "magic_damage_rate 200", "misc_damage_rate 200", "long_damage_rate 200", "short_damage_rate 200", ) These will double the attacks (200% Damage)
-
MikZ reacted to Aeromesi in Devil's Square Nightmare-Mode 2021 NEW! (@editds, @disableds, @repeatds!)
x/y ranges
And thank you! I strongly suggest you to view the Hard-Mode version too, they work basically the same, just how it's handled in the starting/dieing aspects are a bit different.
There's more awesome scripts on the way don't worry =)
-
MikZ reacted to Aeromesi in Name with spaces,
Here's something that basically works with exactly what you're looking for.
So either you let it check all names each time the server restarts (close and restart or @reloadscript) it will delete any name inside SQL database that got spaces and automatically fix them. like "R A G N A" would become "RAGNA". or "M O N K E Y" would become "MONKEY". If you ever want to just load the script inside of a MySQL program to query, I gave you the raw version to.
After using my script, this is what I was able to do:
Before: (Notice all the names)
PS: Inside of script change `hercules` to whatever database name yours is.
After: (Notice names)
Here's the script:
// Created by Aeromesi // Deletes the spaces inside of your name as a player everytime the server restart, /* Raw Version, just load into any MySQL program (HeidiSQL, MySQL administrator to run this query...) MAKE SURE TO CHANGE 'hercules' to your database name. SELECT * FROM `hercules`.`char` WHERE `name` LIKE '% %'; update `char` set `name` = REPLACE(name,' ','') */ // OnInit will allow everytime your server go in maintenance restart etc when it starts up it automatically fix any name with spaces. prontera,0,0,0 script SpaceDeleter -1,{ OnInit: query_sql("SELECT * FROM `hercules`.`char` WHERE `name` LIKE '% %'"); query_sql("update `char` set `name` = REPLACE(name,' ','')"); debugmes "All accounts with spaces fixed"; end; }
Also I just figured out if I fix a character that was "W O W" and became "WOW" if I make another "W O W" he won't be fixed.
UPDATE:
Isn't there like a way to choose in your client hex the allowed characters for character creation? I might be wrong. I might have to find a way where if there converted name equals that of something that already exist they must change their name, maybe get a free name changer ticket? Not sure how to work my way around this one.
-
MikZ reacted to Aeromesi in Devil's Square Nightmare-Mode 2021 NEW! (@editds, @disableds, @repeatds!)
View File Devil's Square Nightmare-Mode 2021 NEW! (@editds, @disableds, @repeatds!)
Devil Square [Nightmare-Mode]
(Special thanks to: IeYaseru (Old friend who gave me a DS script I reinvented)
=============================================================================================================
Description:
In this version of Devil's Square, once the amount of players have joined, that's it.
You won't be able to continue going back inside of Devil Square once you die, after entering and Devil Square starts, it will be closed.
All other players won't be able to join, and it's up to all the players to either complete Devil Square or die and not be able to come back in.
If no players enter in the timeframe, it will cancel out the event.
Also counts up the Max amount of Users when they enter Devil's Square. Once the Max Users have been established, no one else can join, and then it's just up to that team of people!
Once all the Players have died and warped out of the event, it will announce that all the users who entered have failed Victory in Devil Square, and the event will be reset.
=============================================================================================================
Difference in Type 2:
Description:
In this version when you die and get warped out, if you hurry up you'll be able to come back into Devil Square again.
NOTE: You WILL have to REPAY the amount of Zeny to re-enter.
Since players can die, and repay/pay at anytime to join inside the event, there's no need to cancel out the event if no one joins.
New Additions to Revision 5 (For Type 1 And Type 2):
Created commands:
@disableds - Allows you to disable Devil Square whenever you want (This feature is also inside of the NPC!)
@repeatds - Allows you to repeat the Devil Square on the go. (This feature is also inside of the NPC!)
@editds - Allows you to edit, or as I put it "Over Ride" the settings in the OnInit: inside of [DS] Organizer::DSORG
Changes happen in the menu whether the event is active or not. If it's active it will allow you to disable or go to the Player Menu, if it's unactive it'll ask if you want to Start Devil's Square.
Basically redesigned a lot of the aspects of the script, beforehand it didn't even work, and had errors upon errors.
Made the script to be flexible and totally configurable!
Future additions/ideas: Add the ability to also edit the mob data for each Round as well as the MvP list.
Also before hand if it was <= 5 users it would only spawn 8 Treasure Chests, otherwise it would spawn 16. Now you can choose as much as you want!
When a GM is editing an option inside of Devil's Square, another GM cannot edit an option until that GM is done editing an option via `@editds`.
NOTE: Not every Treasure Chest is the same either!
Submitter Aeromesi Submitted 07/28/16 Category Events & Games
-
MikZ reacted to Aeromesi in Deckster the Deck Guy NPC
File Name: Deckster the Deck Guy NPC
File Submitter: Aeromesi
File Submitted: 28 Jul 2016
File Category: Events & Games
So who exactly is Deckster the Deck Guy NPC?
Well he's a simple guy with a simple love for what you say?
Guessing what number he's thinking in his head.
Simply setup the rewards, the minimum as well as the maximum input for the total amount of numbers you can guess.
Configure whether or not the player must pay a fee in order to use the NPC, as well as the fee Item ID/Amount in order to use the NPC.
Located in the OnInit:
$DeckMin = 1; // Minium number to input at the guessing game. $DeckMax = 25; // Maximum number to input at the guessing game. .DeckRewardID = 501; // Reward Item ID .DeckRewardAM = 50; // Reward Item Amount // Default: On setarray $DeckRewardList[0],501,502,503,504,505,506,507,508,509,510; $DeckMaxItems = 10; // IMPORTANT: Edit this value in accordance to how many items you have in the array "$DeckRewardList". $EnableFee = 1; // 0 = Off || 1 = On ( This allows a fee everytime you want to take a shot at Deckster! ) $FeeID = 502; // ID for Item Fee $FeeAM = 5; // Amount of the Item used for the fee $EnableLuckyDay = 1; // 0 = Off || 1 = On ( This allows the user to have a second chance, kind of like your lucky day ! ) $LuckyDayRate = 10; // 10% Chance to trigger a Lucky day to you by Deckster $DeckSetup = 1; // WARNING: IGNORE THIS DO NOT EDIT
Now the cool thing, when a GM accesses the NPC, or types the command `@deckedit` they will literally be able to control every aspect that is in the first time setup configuration in the OnInit.
The new features:
GM Menu (Through contact with NPC or command <script data-cfhash='f9e31' type="text/javascript">/* */</script>`! Able to control the Minium and Maximum numbers a player can bet on. Want it 50-100, or 1-100, 1-1000? it's your choice.
Control The Item Fee ID/Amount as well as enabling/disabling the fee for the NPC
Control the Random Item Reward ID's ( IMPORTANT! PLEASE NOTE: if you want to edit the list of items, edit the array $DeckRewardItems and then count all the items you made and set $DeckMaxItems to the max amount of items the array of your rewards hold.
Control the % rate as well as enabling or disabling the Lucky Day ( Second Chance option) in-case you want the players to have another crack at guessing!
Click here to download this file
-
MikZ reacted to Kuya Jeo in FAILED TO CONNECT TO SERVER
H
How about your inter-server.conf? clientinfo.xml in your grf? <address>127.0.0.1</address>
-
MikZ reacted to Sephus in Max connection (failed to connect)
I think he means a firewall capping your concurrent connections.
-
MikZ reacted to hemagx in Max connection (failed to connect)
Then probably it's just your server can't handle this connections amount
-
MikZ reacted to Dastgir in Get last_mac Address
Let me see what I can do
Edit: Might not able to test the edit, since I don't have Launcher (and I need to recompile the server , which I couldn't afford atm)
Here you go:
https://github.com/dastgir/HPM-Plugins/tree/master/diff
-
MikZ reacted to 4144 in MaxLvExpGain error map-server
Issue in one of plugins.
Please build hercules with debug information.
make clean ./configure --enable-debug make because look like you disabled debug info with special key or have very old hercules.
After rebuild show error again and may be some one, who know this plugin can fix it.
-
MikZ reacted to Dastgir in MaxLvExpGain error map-server
Change
nullpo_retv(ssd);
To
if (ssd == NULL) return;
-
-
MikZ reacted to evilpuncker in costume Job suit
OnEquipScript: <" changebase 4018;">
OnUnequipScript: <" changebase Class;">
-
MikZ reacted to 4144 in disable accinfo
you editing groups.conf. This is configuration file and not source code.
This mean dont need run make or configure.
Need only restart server or run @reloadatcommand
-
MikZ reacted to 4144 in disable accinfo
need add it to commands but you look like adding it to permissions.