-
Posts
205 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by Ryokem
-
-
I'm not really solving the problem, but I was wondering about some parts of your script...
OnInit: initnpctimer; startnpctimer; end; }
Uh? Why are you starting the timer with initnpctimer; and then starting back again with startnpctimer; ? You can't really start an already started timer lol.
just use one. Better initnpctimer; as it automatically sets the npc timer to 0.
- script cutrue_refill_auto 111,{
I'm wondering about the 111 sprite. 111 is an invisible sprite that allows an npc to still be clickable (it appears the dialogue icon when scrolling the cursor over the npc location).
But how can a clickable npc have no maps and no coords? This actually can work, but it can fall into weird server debugings.
- script cutrue_refill_auto -1,{
-
actually your method is already correct ... though, I don't see why your script doesn't work
Actually, I believe he is just setting the wrong coordinates.
In his script, he is randomizing a value from 8 to 31 as X coordinate, while his position (centre of the map) has X = 60.
His position is 10 cells far from the wall, so the item will be not generated in the area where he is.
OnInit: while(1) { if( getmapusers("new_zone04") ) makeitem 969,1,"new_zone04",rand(50,70),rand(170,190); sleep 100; } end;
I believe this code actually works fine, if the item 969 does actually exist.
-
its working now.. thanks btw one more thing
if( !checkvending() ){ set @Hour,@Hour + 1; if( @Hour % 5 == 0 && #Day != gettime(4) ){ getitem 7227,5; set #Day,gettime(4); dispbottom "Online 5 Hours continuously...gained 1 item for today."; } }
the "@Hour % 5" the #5 red color if i set it to 1 it means they need to online for 1 hr ?
Yeah. But then, set @Hour,@Hour + 1; becomes meaningless.
-
announce strcharinfo(0) + " just entered PvP yoyo mode", 0;
By the way, I have no idea what pvp yoyo mode is, so can ya be more specific please?
Also, providing us with your script may help even more.
EDIT:
@darristan please be slower next time xD!
-
Missing the <facing> value. Also, try to use tabulations and not returns between each part of the header.
prontera,151,182,4<TAB>script<TAB>Sample<TAB>757,{
-
Replace line 123 with what follows:
for ( set .@i, 0; .@i < $@members; set .@i, .@i + 1 ) {
Also, you are using eAthena aren't you? Please specify it, 'cause some rA codes doesn't work on eA.
-
Annie just said everything you need to correct your code.
Anyway, just to add the general case to help you on this kind of structure..
Is This The Correct Way of Writing This Type of Code?
( <condition> ) ? <note 1> : <note 2>
Means: if <condition> is met, solve <note 1>; solve <note 2> otherwise.
<note 1> and <note 2> actually must be of the same type (2 string or 2 integers about rA)
Example with integers:
set .@a, ( ( .@b == 2 ) ? 1 : 2 ); // IF .@b == 2, .@a -> 1 else .@a -> 2
Example with strings:
mes " + ( ( .@b == 2 ) ? ".@b is equal to 2" : ".@b is NOT equal to 2" );
-
According to what the others said, I believe this is still the best option given
but it will just reset the characters who logs in. . . xD
and i want it to reset only 3rd job characters as well as kagerou and oboro. . . and then it will give 167 skill points
blame yourself.....you didnt mention about it ....
- script Sample -1,{ OnPCLoginEvent: if( Class >= 4054 && !DONE && BaseLevel >= 150 && JobLevel >= 50){ resetskill; set DONE,1; set SkillPoint,168; message strcharinfo(0),"Skill Resetted."; } end; }
-
Kindly refer to this thread please: http://rathena.org/board/topic/73301-help-me-with-the-script/can you help me with this?
//Exit to Prontera
06guild_01,48,50,5 script exit 899,{
killmonster2; <<<<< not working i want to kill aall monster when your leaving the room when monster died no drop.
warp "prontera.gat" ,155,176;
}
-
Something like...
-<tab>script<tab>monsterKiller<tab>-1,{ OnPCDieEvent: if( strcharinfo(3) != "06guild_01" ) end; killmonsterall "06guild_01"; end; }
-
You can try this script:
OnNPCKillEvent: if (BaseLevel >= 150) getexp - getmonsterinfo(killedrid,3), - getmonsterinfo(killedrid,4); end;
Somehow feels like AnnieRuru gonna come in and shoots at me
It's a nice solution, but that prevents the player to gain exp from killing monsters only, not from all other script sources (like quests, for example).
Even if, I must agree there is no way to prevent a script command to work, unless the proper source modifications.
its possible to make a script when a player is lvl 150 (max lvl 155) to disable exp gains ?
You should be more detailed about "which" exp you want players not to gain: only EXP from killing monsters, only EXP from other script souurces, or both.
- 1
-
You did not copy-paste the file correctly tho. I really see no errors there, and there are tabulations.
Try to copy-paste again
-
Ye.. I forgot to use tabulations in mapflags as well... (I didn't even noticed there were mapflags lol)
-
-
-
=================================================================================
I'm Getting Some kind of Error on line 8.
P.S : Im using a 3ceAm SVN files
================================================================================
prontera,157,178,5<tab>script<tab>Sample<tab>757,{ if ( getgmlevel() < 80 ) end; mes "Input Player Name"; if ( input( .@input$, 4, 23 ) ) { mes "invalid name length"; close; } if ( .@nb == query_sql( "select name, online from `char` where account_id = ( select account_id from `char` where name = '"+ escape_sql(.@input$) +"' ) order by char_num", .@name$, .@online ) ) for ( set .@i, 0; .@i < .@nb; set .@i, .@i + 1 ) mes " > "+ .@name$[.@i] +" "+( ( .@online[.@i] )? "^00FF00[Online]" : "^FF0000[Offline]" )+"^000000"; else mes "No character found"; close; }
All credits @ AnnieRuru
3 small changes done:
input( .@input$, 4, 23 ) //The variable used in the sql command has no capital letter. .@nb == query_sql() //dual '=' needed for comparisons for ( set .@i, 0; .@i < .@nb; set .@i, .@i + 1 ) //Optimized for 3CeaM users (like him)
-
if you think this is wrong ... then its rathena script engine error ?
I dunno ... as I never learn any other programming language
Nah, I just said rAthena is not C++ or other languages, that's all ^^ Just to let him know that not everything about the other programming languages is correct also on rAthena and viceversa.
plss give me the conversion codes for the errors and the for set code on image number 2..... coz im a stupid person who cant understand even a simple variable changes............... thx in advanced
The errors you are showing up are basically all the same.
You can't change the value of a variable by a direct set if using 3CeaM unless you did implement it by yourself.
So:
<variable> = <value>; //This is not allowed in 3CeaM set <variable>, <value>; //This has the same meaning of the command above, but works in 3CeaM
Same with your error:
set .@size, getarraysize([...]);
Also, line 61 (for cicle) presents the same error
for( set .@i, 0; .@ i < .@size; set .@i, .@i + 1 )
-
I understand if you say var++ doesn't work, but has to use set var, var +1;
but why you say var = var + 1; ?
Was speaking about 3CeaM as he said he was using it.
prontera,152,191,5 script woe 100,{ while ( .@i < 5 ) mes "Counting "+ .@i++; close; }
it works you know
Does it? .@i is supposed to be 0 and .@i++ is supposed to do the following:
1. execute the command in which it is called.
2. Increase the variable .@i by 1.
So where's the "0"? The code you wrote would be recognized as (++.@i) from all imperial programming languages, unless the variable starts from 1.
Actually, the output should be "0 1 2 3 4".
or have you messed up this rathena forum and eathena forum ?Sure it can be xD I always have both opened xD
-
EDIT: ups! XD
Commands like var++; will not work. You have to use the full version: var = var + 1;
Plus, as people says, 3CeAM doesn't support direct variable settings, so set command is actually needed.
set .@a, <value>; for( set .@i, 0; .@i < 10; set .@i, .@i + 1 ) //Just sample values. set .@a, .@a + 1;
-
warp <to map>, <to x>, <to y>;
If both <to x> and <to y> are set to 0, the system will generate a random walkable cell in the <to map> map and will warp you there.
warp pay_dun04, 0, 0;
Same with pay_dun03 or all the other maps you need.
-
Did you reload scripts after commenting the agit_controller? Also, are you sure that your server has no other scripts in which the agitstart is called?
-
guild_vs1,0,0,0,0 monster Golden Dokebi 1110,1000,0,0,0"Gold Room Manager::OnMobKilled"
You just did a typo, see the red bolded 0 above.
Also, don't forget the proper tabulations.
guild_vs1,0,0,0,0<tab>monster<tab>Golden Dokebi<tab>1110,1000,0,0,"Gold Room Manager::OnMobKilled"
for more information, you can always check the wiki page.
Script ontimer not work Help me?
in Scripting Support
Posted
Oh.. I'm actually studying SQL and databases at university at the moment, only half course done till now and honestly I can say that's not really something so advanced, what was really hard to do was just to find out every attribute of the table he used, but that's just boringly long more than difficult... He sure has some DB knowledges, but that's not really hard.