Jump to content

SpiritD

Members
  • Posts

    75
  • Joined

  • Last visited

Everything posted by SpiritD

  1. 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
  2. posted edit: it looks like the forum software doesn't like "$@" variables. Here's what those should look like (attached)
  3. 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; } }
  4. 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.
  5. 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
  6. Like this? https://github.com/rathena/rathena/blob/master/npc/mobs/citycleaners.txt
  7. 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!
  8. 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!
  9. 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?
  10. Do you know how to pull the file from Ragnahosting's server? The VPN does not support copy/paste.
  11. 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.
  12. 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.
  13. 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.
  14. Hey guys, Here's the script in question (attached). I can't figure out why it won't load (no errors on map but no mobs, no npc, nothing! )
×
×
  • Create New...