-
Posts
2044 -
Joined
-
Last visited
-
Days Won
51
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by AnnieRuru
-
-
I read some of your scripts, and I think your script still has some room for improvements
maybe you should learn how to streamline your conditions, so others can also read your script easily
example in this script
poring_w01,100,100,5 script Race-To-99 100,{ if (BaseLevel < 99) { npctalk "Sorry, Only Lvl 99 can claim the reward!"; end; } if ($ItemGive == 100) { npctalk "Sorry, all rewards has been taken!"; end; } if (getreward) { npctalk "Sorry, Nothing for you!"; end; } announce "Congratulations! "+strcharinfo(0)+" has claimed his reward for Race to 99 Event", bc_all; getitem 501, 100; ++$ItemGive; getreward = 1; sleep 2000; announce "There are "+(100 - $ItemGive)+" rewards left to give!", bc_all; end; }
put all the false condition before executing the true condition
-
Cure !!
(AnnieRuru optimize the script)
http://upaste.me/95e24958012032bb6
I also changed the configuration part to be just like yours
no freeloop needed ~
-
2
-
-
@llchrisll <3
yup ~ that's the way
sometimes using freeloop doesn't fix the problem ... sometimes ... well ... have to go learn advance SQL commands ~
http://upaste.me/95e24958012032bb6
also, I saw that instance script (made by Emistry), and by reading your script too, I finally understand everything what he actually wants
I admit if you didn't make this script, I might forever never understand his request XD ... give you a rep ~
since I completely rewrite the script, I believe there shouldn't be any ... bug ?
well, now I go implement this on the script made by Emistry
-
1
-
-
query_sql "SELECT `char_name` , `mvp_points` FROM `mvp_rank` ORDER BY `mvp_points` DESC LIMIT 10",.@c_name$,.@mvp_pts;
please index your `mvp_points` field when creating the table, this query will perform full table search if you don't index the field properly
line 56
for ( set .@r,0; .@r < getarraysize(.@c_name$); set .@r,.@r + 1) mes (.@r+1)+". "+.@c_name$+" - "+.@mvp_pts+" Points";
yup missing .@c_name$[.@r] and .@mvp_pts[.@r]
-
1
-
-
if your server enable rodex mail system then I can reconsider this request ...
yes, I mean write *rodex_mail script command to use in rathena ... very simple to do since hercules already having it
EDIT: yeah .... everyone mention @Annie Ruru ....
I actually didn't get any notification ...
-
1
-
-
I remember I made this script
http://herc.ws/board/topic/4552-mvp-ladder-script-enhancement/
curious ... why not just use the new rodex mail ? that also save my time .... very simple to convert into rodex_mail script command
EDIT: oops ~ only hercules has *rodex_mail, rathena doesn't have this script command
also this script is to be use monthly ... if wanna change into weekly it needs lots of tweaking ...
a claim reward option so player can claim the prize whenever they want ??
that needs another SQL table ...
conclusion ... there are 3 heavy modification that you are asking ...
-
hmm ... the default value for .eventlasting is 20 minutes
so you mean like ... at the last 5 min, (after 15 mins has passed), a warp suddenly appear on the map to help player end the game quickly
something like this ?
however I am sure adding a warp portal isn't too hard to do, unless you have ... more unique idea that you like to share ?
-
1st script ... oh that member @pajodex is still active
query_sql("SELECT char_id, CAST(`value` AS SIGNED) FROM `char_reg_num` WHERE `key` = 'MVPKills' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT 20",.@cid,.@value);
this line ... is not optimized, for the reason ... read the topic I linked below
that 2nd script ... makes me laugh ...
in short, even Euphy himself said don't use this script
so remember ... when you write a SQL script that has WHERE clause, make sure that field is indexed
otherwise the SQL will perform full table search
anyways
23 hours ago, Radian said:Yeah your right about the one who last hit the MVP will only get the points, but In my server (still on progress) I removed all MVP monsters from the maps where they re-spawned. and replace it with a special event where they can enter the room when MVP is alive.
I don't really understand this part ... do you mean your server has MVP room like this one ?
https://github.com/rathena/rathena/blob/master/npc/custom/etc/mvp_room.txt
-
@Radianisn't this simple enough ?
bat_a01,151,338,5 script bg_emp_red_portal 45,2,2,{ if ( getcharid(4) != getvariableofnpc( .red, "bg_emp#control" ) ) { message strcharinfo(0), "This portal only works for Red team members"; end; } // warp "Random", 0,0; // I wonder why "Random" doesn't work ? warp strcharinfo(3), 0,0; end; }
make a portal on the map and just warp it randomly, shouldn't be very hard to do
-
just diff your server with this
https://patch-diff.githubusercontent.com/raw/rathena/rathena/pull/2179.diff
it shouldn't be too hard if you already know how to apply patch and recompile your server
-
alrighty ~
yup I've done adjusting this script to suit your needs ~
-
1
-
-
this script is known to be very buggy ...
I can't really read this script properly with all these comments in the script ...
change line 118
if ( !.@item ) { // CHECK IF CODE IS INVALID
into
if ( !.@item || .@code$ != .@pc$ ) { // CHECK IF CODE IS INVALID
.
and this only fix the bug you mentioned
when I test the script, I also encounter other bugs like, I can't really remove promotional code properly
and my map-server.exe throw this error too
[Debug]: at d:\ragnarok\rathena\src\map\script.cpp:16680 - UPDATE `reward_codes` SET `pool` = '-1' WHERE `promo` = 'TEST111' [Debug]: Source (NPC): LilTrollPCodes (invisible/not on a map)
lazy to fix all of them
-
wait ...........
your server doesn't support *bg_get_data type 1
https://github.com/rathena/rathena/pull/2179
how old is your emulator ? seriously ....
part of the reason why I dislike rathena ... doesn't have plugin features too
and for the 2nd request, yup I can do that ~
but since you also needs some time to update your server, I'll just edit this post when its done
-
you can always change to map from 'bat_a01' to 'bat_b01' or 'bat_c01' or whatever map that is suitable for battlegrounds
I do not give support on how to change coordinate though ...
members are expected to know how to change the map, registration npc location and the respawn coordinate themselves
-
the reason why I do not immediately answer your question because you are asking a high level scripting question
I experienced in the past when I misunderstood topic starter, and I posted a very complicated script, they just stop giving any feedback ... makes me feel my effort wasted
what you need to learn is Fisher-Yates shuffle
Haru and me perfected the script and it is currently inside Hercules
here's an example
poring_w01,100,100,5 script dfdsfsadfsdf 1_F_MARIA,{ // here we declare some array setarray .@tmp, 123,234,345,456,567,678,789; .@size = getarraysize( .@tmp ); // just to output the original array .@string$ = .@tmp[0] +""; for ( .@i = 1; .@i < .@size; ++.@i ) .@string$ += ","+ .@tmp[.@i]; dispbottom "original = "+ .@string$; // randomize the array ~ callfunc "F_ShuffleNumbers", 0, .@size -1, .@r; for ( .@i = 0; .@i < .@size; ++.@i ) .@tmp2[.@i] = .@tmp[ .@r[.@i] ]; // output the result ~ .@string$ = .@tmp2[0] +""; for ( .@i = 1; .@i < .@size; ++.@i ) .@string$ += ","+ .@tmp2[.@i]; dispbottom "shuffle = "+ .@string$; end; }
EDIT : PS: if you wanna learn sorting algorithm script I can always show off a little bit
-
1
-
1
-
-
are you trying to shuffle array ?
like 1234 becomes 2134 or 3142 like this ?
EDIT: I want to make sure I understand what he is saying, or else if I bring up my shuffle algorithm script and sorting algorithm script, this can scare some people away
EDIT2: you mean something like
.arr[0] = 123; <-- 1st index
.arr[1] = 234; <-- 2nd index
.arr[2] = 345; <-- 3rd index
to become something like
.arr2[0] = 345; <-- 3rd index from original array become 1st index
.arr2[1] = 123; <-- 1st index from original array become 2nd index
.arr2[2] = 234; <-- 2nd index from original array become 3rd index
-
-
-
1
-
-
just a friendly reminder
you do know that OnNPCKillEvent only trigger by who land the last hit on the MVP (default), or the most damage depends on battle_config.mob_npc_event_type
means, only 1 person is recorded in the rank
it doesn't record those who actually help defeating the MVP, well, playing as priest sux
in other words, your idea only give points to those DD(damage dealer) or who land the lucky last hit, not as the group effort
EDIT: nvm, sometimes I forgot the most basic thing
can just OnNPCKillEvent: and then loop with the *getpartymember, and preferably having battle_config.mob_npc_event_type == 0
anyways do you have any MVP ranker script atm ? I do made MVP ranker script in hercules forum b4 though ...
-
eh ?
I thought I already gave permission to have that folder to share and find by public
try 1 more time ?
https://drive.google.com/file/d/0B2BM920mmHQgVWs2Qm5penBZOVk/view?usp=sharing
-
yes, that's the point
if you only change the battle_config file, you still have to feed it regularly to have max intimacy pet
but if you do source modification, the moment you catch it, the pet will start with max intimacy
EDIT: fix the link
https://drive.google.com/file/d/0B2BM920mmHQgVWs2Qm5penBZOVk/view
-
that's fun XD
I already did the same thing on my hercules test server
https://drive.google.com/file/d/0B2BM920mmHQgVWs2Qm5penBZOVk/view
it shouldn't be far of for rathena server if you know where to edit
-
I admit during last year when I play that MMORPG, I didn't know about MAC address spoofing
yeah, although some players might know the way to bypass this system, but it is enough to block most players from abusing it
me included XD
... meh .. I wonder why people still using waitingroom version ... should've use Battleground Queue system already ..
anyways ..
....
well the script was progressing smoothly until ...
EDIT: nvm stupid me, didn't noticed rathena use another script command *getwaitingroomusers
ok I'm necro posting ... forget this ...
and the script is still incomplete btw
-
#$%@#$^#&&^)(*&_#$%@#$!@#$%#!!@#@%$& ............
[Error]: Missing 1 right curlys in file 'npc/zzz.txt', line '183'.
1 more time
I modified the paste
how to make when event ends announce the top 3 winners
in Scripting Support
Posted
just a few days ago, I just show off did shuffle algorithm
now its time to use sorting algorithm ~![/gg /gg](https://rathena.org/board/uploads/emoticons/default_ani_gg.gif)
http://upaste.me/6ba24958361e5dc26
have fun learning from it ~
and this script has been tested and can be use on live server
https://drive.google.com/file/d/1Nvo4gJyZ6QTF1m55QF2q5a-jnaIONxVX/view?usp=sharing