Brian
-
Posts
2223 -
Joined
-
Last visited
-
Days Won
24
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by Brian
-
-
Here you go: agit_controller_random.txt
I updated the warp names to match the changes in 49459d342ec4e3b5d2ca8dbf85ab924ffa89faca.
-
- script vip_for_1week -1,{ OnPCLoginEvent: // first time logging into this account if (#VIP_expire == 0) { set #VIP_expire, gettimetick(2) + (7*86400); // 7 days dispbottom "Welcome to the server!"; dispbottom "You have been upgraded to a VIP for 1 week."; } if (#VIP_expire > gettimetick(2)) { // they still have time left dispbottom "VIP Rental : expires in " + callfunc("Time2Str",#VIP_expire); atcommand "@adjgroup 1"; deltimer strnpcinfo(3)+"::OnPCLoginEvent"; if ((#VIP_expire - gettimetick(2)) < 2147483) { // prevent overflow error addtimer (#VIP_expire - gettimetick(2)) *1000, strnpcinfo(3)+"::OnPCLoginEvent"; } else { addtimer 2147483000, strnpcinfo(3)+"::OnPCLoginEvent"; } } else if (#VIP_expire > 1) { set #VIP_expire, 1; atcommand "@adjgroup 0"; dispbottom "Your VIP Rental has expired."; } end; }
The values of the variable #VIP_expire0 = they never logged in
1 = they used VIP for 1 week and now it's over
gettimetick(2) = VIP is active and that's the UNIX time when it expires
-
Here's an example of how you could edit the zeny of an offline player: zeny_transfer.txt
query_sql "UPDATE `char` SET `zeny`=`zeny`+'"+.@amt+"' WHERE `char_id`='"+.@char_id+"'";
-
Here's another way to do it with script commands:
// Identify all unidentified items getinventorylist; for( set .@i,0; .@i < @inventorylist_count; set .@i, .@i +1 ) { if ( @inventorylist_identify[.@i] == 1 ) continue; delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0; getitem @inventorylist_id[.@i],1; set .@count, .@count +1; } if (.@count) dispbottom .@count +" items identified.";
- 1
-
I don't think there's a way to change/refresh 'mes' text once it's sent to the client. If the NPC is displaying text with waitingroom, you could have that refresh on a timer or triggered with doevent/donpcevent.
-
Change these 3 variables from temporary character variables to permanent character variables:
@lastwarpmap$
@lastwarpx
@lastwarpy
Find all occurrences of each one and replace with:
lastwarpmap$
lastwarpx
lastwarpy
-
Did you setup 2 SQL databases (and configure in inter_athena.conf), one for each RO server?
-
poring_w01,100,100,0 script test 910,{
I think there's a limit to how long a menu string can be, but I'm not sure what that length is.query_sql "SELECT `char`.`name` FROM `char` WHERE `online` ORDER BY `name` ASC", .@name$;
for (set .@i,0; .@i < getarraysize(.@name$); set .@i,.@i+1) {
set .@menu$, .@menu$ + .@name$[.@i]+":";
}
mes "Please choose the player that you want:";
set .@num, select(.@menu$);
mes "You picked " + .@name$[.@num-1];
// do other stuff here
close;
}
-
Yes you could remove these lines from /src/map/pc.c
// Message of the Day [Valaris] for(i=0; i < MOTD_LINE_SIZE && motd_text[i][0]; i++) { if (battle_config.motd_type) clif_disp_onlyself(sd,motd_text[i],strlen(motd_text[i])); else clif_displaymessage(sd->fd, motd_text[i]); }
- 1
-
motd_txt: conf/motd.txt
^ this line just sets the config setting "motd_txt" to the value "conf/motd.txt"I believe that's also hard-coded to a default value (of "conf/motd.txt") somewhere in /src.
So if you comment out the line, the setting is just set to the default value: conf/motd.txt
To actually remove the motd, just edit the file conf/motd.txt delete everything, and save the file.
-
"bc_red" is not a valid flag, so the constant gets converted to 0, and flag 0 is the same as bc_all.
bc_all 0 bc_map 1 bc_area 2 bc_self 3 bc_pc 0 bc_npc 8 bc_yellow 0 bc_blue 16 bc_woe 32
Flag should be bc_self (or bc_map for the whole map), and then specify the color after.// announce "<text>",<flag>,<fontColor>; announce "You suddenly hear a ghastly voice", bc_self,"0xFF0000"; sleep2 5000; announce "Faint Voice: You, who have known my existence.", bc_map,"0xFF0000"; sleep2 8000;
-
Here you go, try this: http://rathena.kpaste.net/e5d94?raw
I wasn't sure what the item_id of your custom MVP Reward is, so just edit line 72:
// give item to player getitem 55555,1, .@reward_accountid; end;
- 1
-
None of the SQL files in rAthena's /sql-files/ folder contain "playtime".
Is this from a custom source modification you added?
Did the source mod list any SQL queries you needed to run to modify your SQL tables?
-
You have the right idea in your 1st post, but this line
set .@pvp_maps,getmapusers("pvp_y_room") + getmapusers("pvp_y_1-2") + getmapusers("pvp_2v2");
needs to be inside the while loop so it recalculates the 'getmapusers' every loop.When it's before the loop, it only runs once OnInit and the count is never recalculated.
OnInit: while (1) { delwaitingroom; set .@count, getmapusers("pvp_y_room") + getmapusers("pvp_y_1-2") + getmapusers("pvp_2v2"); waitingroom "PvP Room ["+ .@count + ((.@count==1) ? " User" : " Users") +"]",0; sleep 1000; } }
-
Yes, a script could display a MVP Ladder using the info from the mvplog table.
Turn on mvplog in /conf/log_athena.conf
// Log MVP Monster Drops (Note 1) // Outdated. Use Pick_Log instead. But this log could be useful to keep track slayed MVPs log_mvpdrop: yes
Each mvp monsters has a different points to give dependin on its difficulty.
Can you post a list of what you want the points to be for each MVP?
-
They are saved in RAM and deleted when the character logs out or when the @var is deleted (set to 0 or string set to ""). Since there is no secondary storage, there is no "save interval". They are updated (in RAM) only when the @var changes.
-
From within the script if you use strnpcinfo(3) that will reference the NPC's unique name, and in duplicated NPCs, that will be the unique name of the duplicate NPC.
To call a label, use donpcevent.
getvariableofnpc can only fetch npc-bound variables, but not arrays.
If you're planning on accessing variables of other NPCs on the map or triggering event labels in other NPCs on the map, I suggest name the NPCs like this: NPCNAME#mapname
BattleNPC#poring_w01
testnpc#poring_w01
BattleNPC#anothermap
testnpc#anothermap
Then if you want BattleNPC#poring_w01 to trigger something in testnpc#poring_w01 you could do:
donpcevent "testnpc#" + strnpcinfo(4);
which will be "testnpc#poring_w01" because strnpcinfo(4) returns the name of the map the NPC is in.When you create duplicates on different maps, strnpcinfo(4) will return the mapname and it will work (as long as your npcs are named NPCNAME#mapname.
-
Can you post the part of your script that creates the duplicate NPCs?
-
Instead of coordinates x,y use coordinates 0,0. This will warp them to a random spot on the map. Or do you have a list of specific coordinates you want to use (ex: random corner of a PVP map) ?but this only can teleport on fix where i need one not fix warp
-
Your script shows the query that created the `mvprank` table:
OnInit: query_sql "CREATE TABLE IF NOT EXISTS `mvprank` (`id` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0',`name` VARCHAR( 23 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,`mvpkills` BIGINT UNSIGNED NOT NULL ,UNIQUE (`id`)) ENGINE = MYISAM";
But how did you create the `mvp` table? Can you post the SQL query you used? -
Add OnPCLoadMapEvent in your script so it looks like this:
OnPCLoginEvent: OnPCLoadMapEvent:
/npc/scripts_mapflags.conf - add this line:npc: npc/mapflag/loadevent.txt
/npc/mapflag/loadevent.txt <-- create this file, and add the map(s) that you want OnPCLoadMapEvent to trigger on. If you want every map, use this file: http://pastebin.com/raw.php?i=K5d4b3bp -
It sounds like a problem with the client.
I tested on 2013-12-23Ragexe and did not get any Gravity error.
-
if (getequipid(.@a) > -1) {
For checking if they have an item equipped in that slot, you should use getequipisequiped.
Even though 'getequipid' returns -1 if no item is equipped, that is considered a failure of the script command and that's why the map-server shows the debug message.
-
thanks for reply how can i see like in your screenshot??
The screenshot is from clicking this script: statpointcount.txt
N> script with groupid()?
in Script Requests
Posted
Add this getgroupid check at the beginning: