-
Posts
130 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by plankt
-
-
Please share the code you wrote.
-
Look at the example F0xxy gave. You just need to replace 'cell_novending' with 'cell_basilica' and 'dellar' with 'ordeal_1-2'.
-
See http://rathena.org/board/topic/65550-how-to-write-a-script-for-no-vending-on-streets-in-towns/
cell_basilica should work like that.
-
*setcell "<map name>",<x1>,<y1>,<x2>,<y2>,<type>,<flag>;
Each map cell has several 'flags' that specify the properties of that cell.
These include ... no vending ...
Examples:
setcell "arena",0,0,300,300,cell_basilica,1; setcell "arena",140,140,160,160,cell_basilica,0; setcell "arena",135,135,165,165,cell_walkable,0; setcell "arena",140,140,160,160,cell_walkable,1;
From const.txt:
cell_walkable 0 cell_shootable 1 cell_water 2 cell_npc 3 cell_basilica 4 cell_landprotector 5 cell_novending 6 cell_nochat 7
-
1
-
-
Looks good, you can reduce two checks of the same item:
(gettime(3)==19 && gettime(3)==19)
to only check once:
(gettime(3)==19)
-
You can actually have quotes (') around integers, it's not recommended but often easier if you don't know if you're using strings or integers. Often with dynamic content.
The delete statement in MySQL is
"DELETE FROM <table> WHERE <where condition>"
So you would not get (adding extra spaces for clarity)
"DELETE `" + .@b$[.@c] + "` FROM `" + .@g$ + "` WHERE `id` = ' " + .@f + " ' "
But rather (not totally sure what the variables are but I'm guessing .@b$ is the field)
"DELETE FROM `" + .@g$ + "` WHERE `" + .@b$[.@c] + "` = ' " + .@f + " ' "
-
1
-
-
Was it just me or did he go from "npc:testnpc.txt" and "custom/test.txt" to "npc:test.txt" and "custom/testnpc.txt" in the second image?
In the future, just make sure you have the same name at both places.
-
Did you place the file you made in "npc/custom/" folder? And did you name it "test.txt"?
File not found indicates that there's no script in that folder with that name.
-
Except @inventorylist_id and @inventorylist_amount. They need to stay '@'.
-
What he means is that a temporary character variable, @var, will have the same value until it's overwritten or the user logs off.
You must make sure that when the user runs the script for the second time, the variable values aren't messing with it.
-
You can read about the loops here: http://rathena.org/wiki/For#For_Loop
I would do a "do ... while" loop for finding the part like this:
do { set .@i, rand(1,10); } while (getequipid(.@i) == 0);
If you use temporary NPC variables, .@var/.@var$, you won't have to reset them.
Just make sure you never expect them to be set, always make sure to initialize variables.
-
Inside "src\map\status.h" you will find this section:
/** * Max Refine available to your server * Changing this limit requires edits to refine_db.txt **/ #ifdef RENEWAL # define MAX_REFINE 20 #else # define MAX_REFINE 10 #endif
What it says is, if you have renewal, max refine rate will be 20, otherwise it'll be 10. You can change this for any value you want above 10.
You will need to re-compile after changing this.
-
1
-
-
If you're looking for the refiner scripts, they are in the folder "npc\merchants\"
If you want to know the commands required for refining:
*successrefitem <equipment slot>;
This command will refine an item in the specified equipment slot of the invoking
character by +1. For a list of equipment slots see 'getequipid'. This command
will not only add the +1, but also display a 'refine success' effect on the
character and put appropriate messages into their chat window. It will also give
the character fame points if a weapon reached +10 this way, even though these
will only take effect for blacksmith who will later forge a weapon.
The official scripts seems to use the 'successrefitem' command as a function
instead: 'successrefitem(<number>)' but it returns nothing on the stack.
This is since jAthena, so probably nobody knows for sure why is it so.
---------------------------------------
*failedrefitem <equipment slot>;
This command will fail to refine an item in the specified equipment slot of the
invoking character. The item will be destroyed. This will also display a 'refine
failure' effect on the character and put appropriate messages into their chat
window.
The official scripts seems to use the 'failedrefitem' command as a function
instead: 'failedrefitem(<number>)' but it returns nothing on the stack. This is
since jAthena, so probably nobody knows for sure why is it so.
---------------------------------------
*downrefitem <equipment slot>;
This command will downgrade an item by - 1 in the specified equipment slot of the
invoking character. So the item will not be destroyed unlike in the failedrefitem script command.
This will also display a 'refine failure' effect on the character and put appropriate
messages into their chat window.
The official scripts seems to use the 'downrefitem' command as a function
instead: 'downrefitem(<number>)' but it returns nothing on the stack. This is
since jAthena, so probably nobody knows for sure why is it so.
-
*specialeffect2 <effect number>{,<send_target>{,"<Player Name>"}};
This command behaves identically to the 'specialeffect', but the effect will be
centered on the invoking character's sprite.
<Player name> parameter will display <effect number> on another Player than the
one currently attached to the script. Like with specialeffect, when specifying
a player, <send_target> must be supplied, specifying AREA will retain the default
behavior of the command.
Example:
prontera,159,189,4 script Test 123,{ specialeffect2 12; }
-
Could you share the error message?
-
Don't remove pronteras define, just add caspen below.
Out of curiosity, did you screenshot with a phone camera? ^^
-
It's next to impossible to inject if they do not get to insert text.
A possibility could exist depending on where it gathers it's information; like the name of character or a party name which could lead to an injection.
-
1
-
-
Something like "npctalk"?
31: close2; : npctalk "your message"; : end; 32: }
-
The main error is, like it says, a parsing error. It's not an error with the query but how it's written in the code.
The second error however is a sql error. I'm guessing there's a new line where there shouldn't be.
It would be easier to help if we had a file to look at, please paste it to http://www.upaste.me
-
You can put that message above:
Line 31: close;
Here's simplified what lines 21 -> 33 does:
21: for( each item ){ 22: if( you dont have enough of an item ){ 23: mes "Reward : <item id> x <item amount>"; 24: <filler line> 25: mes "then bring me those items :"; 26: <filler line> 27: mes < zeny required > 28: for( each required item ){ 29: mes < items required > 30: } : // Here you want to print your message 31: close; 32: } 33: }
-
Just to clarify. The color code consists of 3 hex numbers.
The first is how much red, the second is how much green and the last for blue.
^XXXXXX
You can change the amount of each color to make different colors.
The values goes from 00 to FF (255) using hexadecimal numbers (1-9, A-F)
-
1
-
-
Luckily you won't have to know that since they won't be the ones judging
-
1
-
-
As item script:
set .@hp, MaxSp-MaxHp; set .@sp, MaxHp-MaxSp; bonus bMaxHP, .@hp; bonus bMaxSP, .@sp;
Will bug a bit if you put stats while the item is equipped. Solved by re-equipping the item.
-
I just started my time off for summer which means I'll have plenty of time, which means that if there's interest in this I could bring it up again. I won't start it unless at least 3 members show interest to join.
@peopleperson49,
All scripts will be private until rated, then the thought was to publicly release them, with full credits to the scripter of course.
This is because the contest itself is for coders to improve by working with/against others on similar codes. Maybe catch up on a smart way someone solved an issue you had.
And how do you know the judge won't steal your work?
how to put safe zone on pvp area
in Scripting Support
Posted
It might work with mapflag pvp and instead of adding basilica, you remove cell_pvp in that area.