-
Posts
75 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by SpiritD
-
-
-
working on this - code coming soon
EDIT: Here you go. Again, not sure if I am using the variable scope (or array) correctly or not. Someone with more experience, please fix this if it's wrong. You can use the variable "pvpRank" for your shop NPC.
- script pvpCounter -1,{ //define maps where script is actively checking $@pvpMaps$[0] = "enter map name"; //map #1 $@pvpMaps$[1] = "enter map name"; //map #2 //add more maps like above OnPCDieEvent: if(strcharinfo(3) == $@pvpMaps$[0] || strcharinfo(3) == $@pvpMaps$[1]){ pvpPoints--; message strcharinfo(0),"You have been killed and lost 1 point. "+pvpPoints+" total points."; end; } end; OnPCKillEvent: if(strcharinfo(3) == $@pvpMaps$[0] || strcharinfo(3) == $@pvpMaps$[1]){ pvpPoints++; pvpPoints++; message strcharinfo(0),"You have killed a player and gained 2 points. "+pvpPoints+" total points."; end; } end; } <YOUR_MAP>,<YOUR_X>,<YOUR_Y>,<YOUR_Z> script PvP Clerk::pvpClerk 111,{ if (pvpPoints <= 99) { mes "Your PvP Rank is "+pvpRank+"; close; } if (pvpPoints >= 100 && pvpPoints <= 199 && pvpRank == 0) { pvpRank = 1; mes "You have "+pvpPoints+" points."; mes "Your PvP Rank is "+pvpRank+"; close; } if (pvpPoints >= 200 && pvpPoints <= 299 && pvpRank == 1) { pvpRank = 2; mes "You have "+pvpPoints+" points."; mes "Your PvP Rank is "+pvpRank+"; close; } else { end; } }
- 1
-
14 hours ago, iamjhigz said:
Can someone give a script about this Race to max level reward giver.. When player reaches his max level. he will talk to this npc then. give him reward.
The reward is only for 50 players only.
Thanks for the help.. i really appriciate it if someone release it. Thank you in advance GODBLESS
ps. I think this will help new server maker..prt_fild08,158,361,0 script maxLevelRace -1,{ OnPCBaseLvUpEvent: if(baseLvl == 99 && $raceEventCap <= 50) { //initiate when a player reaches level 99 AND the event cap has not been reached $raceEventCap++; announce strcharinfo(0)+" has won the race to level 99! "+$raceEventCap+"/50"; //you can reward here end; } else { end; } }
warning - I don't know how to use variables
edit: I checked the variable type and I had it wrong. Use $variable for GLOBAL variable - not just attached to the character.
SpoilerPrefix: scope and extent nothing - A permanent variable attached to the character, the default variable type. They are stored by char-server in the `char_reg_num` and `char_reg_str`. "@" - A temporary variable attached to the character. SVN versions before 2094 revision and RC5 version will also treat 'l' as a temporary variable prefix, so beware of having variable names starting with 'l' if you want full backward compatibility. "$" - A global permanent variable. They are stored by map-server in database table `mapreg`. "$@" - A global temporary variable. This is important for scripts which are called with no RID attached, that is, not triggered by a specific character object. "." - A NPC variable. They exist in the NPC and disappear when the server restarts or the NPC is reloaded. Can be accessed from inside the NPC or by calling 'getvariableofnpc'. Function objects can also have .variables which are accessible from inside the function, however 'getvariableofnpc' does NOT work on function objects. ".@" - A scope variable. They are unique to the instance and scope. Each instance has its own scope that ends when the script ends. Calling a function with callsub/callfunc starts a new scope, returning from the function ends it. When a scope ends, its variables are converted to values ('return .@var;' returns a value, not a reference). "'" - An instance variable. These are used with the instancing system and are unique to each instance type. "#" - A permanent local account variable. They are stored by char-server in the `acc_reg_num` table and `acc_reg_str`. "##" - A permanent global account variable stored by the login server. They are stored in the `global_acc_reg_num` table and `global_acc_reg_str`. The only difference you will note from normal # variables is when you have multiple char-servers connected to the same login server. The # variables are unique to each char-server, while the ## variables are shared by all these char-servers. -
1 hour ago, ItsFree said:
no >< what i want i set 1 monster but is spawn on different maps, for example that wild rose could spawn on pronter, or payon, or izlude, or aldebaran, etc after wild rose die, the next respawn woul be at random again to one of the maps designed.
This is untested... I don't know if it will work but it should be a good start I think??
function script getRandMap { //this function is to assign a random map name to a variable $randMap == rand(0,4); if ($randMap == 0){ setd $mapName == "prontera"; return; } if ($randMap == 1){ setd $mapName == "payon"; return; } if ($randMap == 2){ setd $mapName == "morroc"; return; } if ($randMap == 3){ setd $mapName == "izlude"; return; } if ($randMap == 4){ setd $mapName == "prt_fild08"; return; } else { debugmes "ERROR: Random Map generation failed!"; end; } } anyMap,anyX,anyY,anyZ script <name_NPC>::monsterEvent 111,{ //this can be floating NPC, i forget how OnInterIfInitOnce: callfunc "getRandMap"; monster $mapName,0,0,"Event Monster",<insert_mob_id>,1,"monsterEvent::OnRespawnMonster"; debugmes "DEBUG: EVENT MONSTER SPAWNED SUCCESSFULLY "+$mapName; end; OnRespawnMonster: announce strcharinfo(0)+" killed the event monster! Respawning..."; callfunc "getRandMap"; monster $mapName,0,0,"Event Monster",<insert_mob_id>,1,"monsterEvent::OnRespawnMonster"; debugmes "DEBUG: EVENT MONSTER RESPAWNED @"+$mapName; end; }
*Edit: Obviously there are some things you need to add yourself. Such as the location of the NPC (you can make it floating NPC... no need to click) and the type of monster, the maps you want it to spawn on, etc
-
14 minutes ago, ItsFree said:
Hi, rAthena Community i've a new request i dont know if possible but i'll try to explain it the better way i can do....
as i know this is a normal mob spawn...
prontera,0,0 monster Wild Rose 1261,1,7200000,3600000
Ok... what i want for example is that, that "wild rose" spawn between prontera, payon, louyang, morocc, alberta & izlude.... i mean if i set 1, or 2, o 3 mobs they spawn "random" on all those maps... is there a way to do something like that ¿?
If need more info tell me i'll try explain better ^^Like this?
https://github.com/rathena/rathena/blob/master/npc/mobs/citycleaners.txt
-
1 hour ago, sader1992 said:
try to do it your self
you wont learn how until you start with some script
you have an idea so this is your chance
I appreciate your input. I am learning by myself but I would like to have someone to hold my hand for a bit while I develop my skills and become comfortable writing my own scripts. If you are interested in helping me, please send me a PM.
If anyone else is interested, please reply here or send me a PM. Thanks!
-
Hello everyone.
I'll get right down to it - I need someone to help me with scripting. I have a lot of (seemingly) simple ideas but I need help to make sure I am doing it right. Your knowledge of scripting should range from fluent to advanced (I am a beginner). Prefer to chat on Discord but open to other forms of communication. Additionally, I am open to offering compensation in varying forms.
Please use this thread to reply. First come, first serve.
Thank you! -
Just now, sader1992 said:
then how you edit add new files ?
I appreciate you trying to help but I am currently unable to paste the raw text (less I type it all by hand on my physical machine). Can we please focus on the script?
-
7 minutes ago, sader1992 said:
plz post the script it self not screenshot (use the Code button when you post the script)
this will make it faster and easier to fix
Do you know how to pull the file from Ragnahosting's server? The VPN does not support copy/paste.
-
5 minutes ago, crazyarashi said:
You have 2 extra curly == } on L_help2 :))
Thank you so much for trying to help. However, it appears the image was messed up when I saved it and those curly brackets are not present in the file. I'm not sure about ALL of the syntax but those last few lines with the glitchy-looking text are proper. If anyone has experience with Ragnahosting and can tell me how to copy/paste raw text from the VPN I'm sure we would all appreciate it.
-
2 minutes ago, crazyarashi said:
Did you check the format of the NPC
it should be
new_zone01<TAB>script<TAB>soldier<tab>105,{Correct. There are tabs in place at those specific locations. Should have coords after the map_name, correct? Those are there too.
/edit/ What's interesting is that the first line (mob spawn line) doesn't spawn the mobs either.
-
Hello, I am sorry crazyarashi but I cannot copy/paste the raw text because the script is through a VPN that doesn't support pasting outside of the virtual terminal. You can see the text in full size by opening the image directly. I know you're trying to help and I appreciate the support but I apologize for the inconvenience.
-
Requesting a PvP System with Kill = Points and more stuff
in Script Requests
Posted
I edited the script cause im a dummy and left out some stuff and getmapxy was completely wrong. Use this updated script below and let me know if you get any error
https://pastebin.com/1PLA5Esh
you will check for "pvpRank" variable with your shop