angelwarrior
-
Posts
29 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by angelwarrior
-
-
Sorry for doble post but i can't disable npc with this. My script is :
prontera,150,150,0 script Instanced Prontera#a 101,{ set .@instance$, "Primer Jefe"; if (instance_id()) { if (select("Enter Instance.:Cancel.") == 2) end; if (instance_enter(.@instance$) != 0) { mes "Instance entrance ^FF0000failed^000000."; close; } } else { if (select("Create Instance.:Cancel.") == 2) end; if (instance_create(.@instance$) < 0) { mes "Instance creation ^FF0000failed^000000."; close; } mes "Instance created."; close2; instance_enter(.@instance$); .@map$ = instance_mapname("pvp_n_1-3"); monster .@map$,0,0,"--ja--",1296,1,0,2; } end; OnInstanceInit: disablenpc instance_npcname(strnpcinfo(0)); disablenpc instance_npcname("warpmvp1"); end; }
pvp_n_1-3,100,140,0 script warpmvp1 45,2,2,{ warp "piso1",178,223; end; }
EDIT: I put the script inside a npc in instance map and i can solved it. But i have another problem but i go to post it
-
after
monster .@map$,0,0,"--ja--",1002,150,.@label$,2;
okay, inside the same script. Thanks!
-
ok, and if i want to put a boss in this map? where i should write the code line ?
-
I have a problem. When i enter to my instance all npc are enable and there are no mobs. I have a warp portal inside that map and i dont want it is enabled because it enabled when players kill mvp from this map.
How i can disable it?
prontera,150,150,0 script Instanced Prontera#a 101,{ set .@instance$, "Primer Jefe"; if (instance_id()) { if (select("Enter Instance.:Cancel.") == 2) end; if (instance_enter(.@instance$) != 0) { mes "Instance entrance ^FF0000failed^000000."; close; } } else { if (select("Create Instance.:Cancel.") == 2) end; if (instance_create(.@instance$) < 0) { mes "Instance creation ^FF0000failed^000000."; close; } mes "Instance created."; close2; instance_enter(.@instance$); } end; OnInstanceInit: disablenpc instance_npcname(strnpcinfo(0)); end; }
-
pvp_n_1-3,83,116,5 script PoringSpawner1 139,{ end; OnNPCKillEvent: if (killedrid == 1296) { /* - if player kill several monsters in few seconds, spam of enable/disable Set a variable when timer start then clear when end */ getmapxy(.@mapa$,.@x,.@y,0); if (.@mapa$ == "pvp_n_1-3") { enablenpc "PoringWarp1"; sleep 120000; disablenpc "PoringWarp1"; end; } } // <- add end to stop the script here otherwise if players kill another monster than 1296 or 1296 on another map than pvp_n_1-3, the warp is disabled //Disable the warp when the server starts. OnInit: disablenpc "PoringWarp1"; end; } //My Example //Warp NPC pvp_n_1-3,100,140,0 warp PoringWarp1 1,1,aldebaran,143,57
can you help me yo put variable there? how i can put it? set variablewarp, 1; then?
-
Hi guys i have a script that is not working okay. Yesterday it worked fine, but today when i kill monster, the warp dissapear pass 10 seconds or sometimes 3 seconds.
pvp_n_1-3,83,116,5 script PoringSpawner1 139,{ end; OnNPCKillEvent: if (killedrid == 1296) { getmapxy(.@mapa$,.@x,.@y,0); if (.@mapa$ == "pvp_n_1-3") { enablenpc "PoringWarp1"; sleep 120000; disablenpc "PoringWarp1"; end; } } //Disable the warp when the server starts. OnInit: disablenpc "PoringWarp1"; end; } //My Example //Warp NPC pvp_n_1-3,100,140,0 warp PoringWarp1 1,1,aldebaran,143,57
-
Because we still with old prontera configs. To fix walkable cell, you need to open you mapcache, remove prontera and readd it (do not forget to configure your grf-files to read your data.grf or your data folder).
NPCs and warps need manual change in coordinates.
I don't know how i can open mapcache? mapcache.exe? and how i can edit there?
-
I want the same please
-
Fixed that for you. BTW, indent your code properly. You won't need those unnecessary blank lines if you indent your code properly.
- script cofresdeltesoro -1,0,5{ end; OnNPCKillEvent: if (killedrid == 1732) { set .@var, rand(1,10); // Use scope variable instead when dealing with "use once and forget" variable like this. [secretdataz] switch (.@var) { case 1: getitem 909,1; break; case 2: getitem 7126,1; break; case 3: getitem 7300,1; break; case 4: getitem 909,1; break; case 5: getitem 2610,1; break; case 6: getitem 728,1; break; case 7: getitem 909,1; break; case 8: getitem 909,1; break; case 9: getitem 7126,1; break; case 10: atcommand "@monster 1474"; break; } } // End if end; }
Here's GitHub Gist link of this script in case rA forum mess up with the indents.
I kill it monster and it Doesn't work
Map doesn't says nothing
- script cofresdeltesoro -1,{ OnNPCKillEvent: if(killedrid == 1732) set .@var,rand(1,10); switch(.@var){ case 1: getitem 909,1; break; case 2: getitem 7126,1; break; case 3: getitem 7300,1; break; case 4: getitem 909,1; break; case 5: getitem 2610,1; break; case 6: getitem 728,1; break; case 7: getitem 909,1; break; case 8: getitem 909,1; break; case 9: getitem 7126,1; break; case 10: atcommand "@monster 1474"; break; } end; }
Working perfectly for me..
Try to use this as a guide, understand it and you will improve your scripting skills c:
Thank you . It work for me too. But i do not know that you can put a " ; after a command and other command with ; before. You optimized the spaces o.o
-
Edit those close; commands and write break; instead. C:
___
EDIT:
Also, that last break; (after the switch (){}) may cause an 'unexpected break; usage' error, in that case you just comment that to troubleshoot.
mmm I try change that close; for end; but nothing happend :
- script cofresdeltesoro -1,0,5{ OnNPCKillEvent: if (killedrid == 1732) { set var, rand(1,10); switch (var) { case 1: getitem 909,1; end; case 2: getitem 7126,1; end; case 3: getitem 7300,1; end; case 4: getitem 909,1; end; case 5: getitem 2610,1; end; case 6: getitem 728,1; end; case 7: getitem 909,1; end; case 8: getitem 909,1; end; case 9: getitem 7126,1; end; case 10: atcommand "@monster 1474"; end; } break; } // End if end; }
Can you make the modification that you mention please? or teach me with an example =)
-
You sure to write the map name correctly?
Anyways, use this line of script as an example:
moc_prydb1,0,0,0,0 monster Poring 1002,70,0,0,0
And edit to your liking.
Chance the name of 'Poring' to whatever you want, it don't has to be the same as the monster you want to be there, just the name to show of them.
1002 is where you will input the monster ID of your liking.
70 will be the ammount of that monster.
You can paste that line of code in any script you using, not just the script_monster.conf or so.
Hope it helps
Sorry for the bad english, I'm a bit sleepy
Thank you
-
I want to put a type of mob in moc_prydb1(thief guild) but i can't. I try put that in other files(moc pyramid dungeon) but nothing happend. I make reload, reset server, etc..
What happend?
Help me please.
-
Hi guys,
I am making a script called treasurechest is simple you kill a chest(woechest) and you can get an item or spawn a mimic. But because i am noob scripter i don't know why it doesn't works.
- script cofresdeltesoro -1,0,5{ OnNPCKillEvent: if (killedrid == 1732) { set var, rand(1,10); switch (var) { case 1: getitem 909,1; close; case 2: getitem 7126,1; close; case 3: getitem 7300,1; close; case 4: getitem 909,1; close; case 5: getitem 2610,1; close; case 6: getitem 728,1; close; case 7: getitem 909,1; close; case 8: getitem 909,1; close; case 9: getitem 7126,1; close; case 10: atcommand "@monster 1474"; close; } break; } // End if end; }
Where is error? or how i can do it?
Console map doesn´t says nothing
The script should be global cause treasure chests will are in many maps.
-
Hi guys,
I want delete this npc but I can't find it. I look in google and not appear . I have no idea in what file is.
Help me please.Thank you!
https://gyazo.com/6cfbbdc6acb58cef931f02436b5c99fc
EDIT: I Find it . She is in lightalzen quest ....lol
close post please.
-
Put an `end;` after the first line to prevent the player from executing the script by clicking on the NPC.
prontera,157,169,5 script Espadachín2 119,{ end; OnNPCKillEvent: if (killedrid == 1002) { getmapxy(.@mapa$,.@x,.@y,0); if (.@mapa$ == "prontera") { sleep2 10000; atcommand "@addwarp morocc 156 93 boss01"; sleep2 10000; atcommand "@unloadnpc boss01"; LQuests = LQuests | 1; } // End if } // End if end; }
By the way, your script has multiple flaws.
- When multiple Porings get killed in Prontera at the same time, the warp NPC's name from @addwarp won't be boss01 anymore because there can't be more than one "boss01" NPC. Adding a permanent warp NPC and play around with `enablenpc` and `disablenpc` is a better practice.
- I see the `LQuests` variable, so this is a quest NPC, right? If there's another NPC spawning a Poring for this quest. You better use an event label for mob instead of OnNPCKillEvent. Example below.
//My Example prontera,160,169,5 script PoringSpawner 118,{ mes "I'm just a Poring Spawner."; mes "Beware, that Poring will kill you with its cuteness."; close2; monster "prontera",160,165,"Kill me please",1002,1,"PoringSpawner::OnPoringDead"; end; OnPoringDead: getitem 512,1; //Get an apple! enablenpc "PoringWarp"; sleep 10000; disablenpc "PoringWarp"; end; //Disable the warp when the server starts. OnInit: disablenpc "PoringWarp"; end; } //Warp NPC prontera,165,169,0 warp PoringWarp 1,1,morocc,156,93 //Your Original NPC with some modifications prontera,157,169,5 script Espadachín2 119,{ end; OnNPCKillEvent: if (killedrid == 1002) { getmapxy(.@mapa$,.@x,.@y,0); if (.@mapa$ == "prontera") { sleep2 10000; atcommand "@addwarp morocc 156 93 boss01"; sleep2 10000; atcommand "@unloadnpc boss01"; set LQuests, LQuests | 1; } // End if } // End if end; }
I put a poring as example monster. But it should be a mvp in dungeon. I will try with that, and i tell you. Thanks!
ahh: There is a way to make it without npc? a event that execute in a map? where I should put it? same way?
- When multiple Porings get killed in Prontera at the same time, the warp NPC's name from @addwarp won't be boss01 anymore because there can't be more than one "boss01" NPC. Adding a permanent warp NPC and play around with `enablenpc` and `disablenpc` is a better practice.
-
Put old Prontera's map files into your GRF and update your mapcache.
Although, you can just change the warps coordinate by a bit in npc/warps/cities/prontera.txt. It's a lot simpler
sorry but idk how put it? or where i can find those files?
The problem is that builiding give Lag when i walk between it
-
I have a problem(see images):
https://gyazo.com/2e9c2fbbec30cb5eced21a68361bc330
https://gyazo.com/2be73ba668977d2195936ca97ec1dba8
is as if all building are moved a cells
how i can fix it? can i put old prontera? how?
-
Hi, I need a script that spawn a warp portal when the users kill a boss. this warp dissapear when pass 1 minute. I were looking for commands to make it possible.
I think with:
OnNPCkillEvent :
But i don´t know how combine it correctly. Adding i have a noob question, the script i should to put in a npc? is it global? idk.
thx
prontera,157,169,5 script Espadachín2 119,{ OnNPCKillEvent: if (killedrid == 1002) { getmapxy(.@mapa$,.@x,.@y,0); if (.@mapa$ == "prontera") { sleep2 10000; atcommand "@addwarp morocc 156 93 boss01"; sleep2 10000; atcommand "@unloadnpc boss01"; set LQuests, LQuests | 1; } // End if } // End if end; }
I make it, but i think that it can be improved. because if people kill monster one time they can click npc and it execute anyways... =/
Warp appears off me
-
You can use these commands to create/remove invisible walls and spawn barricades on them and kill the barricades later.
*setwall "<map name>",<x>,<y>,<size>,<dir>,<shootable>,"<name>"; *delwall "<name>"; Creates an invisible wall, an array of "setcell" starting from x,y and doing a line of the given size in the given direction. The difference with setcell is this one update client part too to avoid the glitch problem. Directions are the same as NPC sprite facing directions: 0=north, 1=northwest, 2=west, etc.
Then you can use
areamobuseskill "<map name>",<x>,<y>,<range>,1905,"NPC_INVINCIBLE",1,0,0,0,0;
This is not the best practice for making barricades invincible. But who cares? Players can't pass the wall if the MVP is alive and killing the barricades is going to take them long time that they will get killed by the MVP first.
I should to make a npc and inside him i put this script? how i can activate it?
-
Perdón por colgarme al post, pero este código podría funcinarte:
prontera,154,173,5 script Capitán 657,{ mes "Ando en busca de aventureros para"; mes "adentrarse en el dungeon de La Ciudad"; mes "de los Inicios"; next; mes "Necesitas ser sobre nivel 15"; if(BaseLevel >= .Level){ if(itemEntregado != 1){ getitem 12622,1; set itemEntregado,1; close; }else{ mes "Ya te hemos dado el item"; close; } }else{ mes "Lo siento te faltan "+(.Level-BaseLevel)+" niveles"; mes "ve a entrenar"; close; } OnInit: set .Level,15; end; }
Edité algunas partes y ordené sentencias.
Hola, como pusiste los Tab? #Offtopic
Si, ahí funcionó. Yo la verdad soy nuevo en esto de los script, he estado aprendiendo mirando ejemplos y cosas. Pero aún sigo tan noob que te hare una pregunta , para que sirven esos Oninit o ON cosas?
saludos
Son labels, digamos en programacion son como Lisenners, cuando pasa una accion se activa
OnInit: Cuando se carga el NPC (se inicia la variable con ese valor en el caso del script).
https://rathena.org/wiki/Basic_Scripting#Labels.2C_Goto.2C_and_Endaqui estan algunas, busca en la wiki ahi estan documentadas
Amigo puedes responderme por acá lo de el script del warp matando al mvp, que lo han borrado allá en la otra parte.
saludos
-
Perdón por colgarme al post, pero este código podría funcinarte:
prontera,154,173,5 script Capitán 657,{ mes "Ando en busca de aventureros para"; mes "adentrarse en el dungeon de La Ciudad"; mes "de los Inicios"; next; mes "Necesitas ser sobre nivel 15"; if(BaseLevel >= .Level){ if(itemEntregado != 1){ getitem 12622,1; set itemEntregado,1; close; }else{ mes "Ya te hemos dado el item"; close; } }else{ mes "Lo siento te faltan "+(.Level-BaseLevel)+" niveles"; mes "ve a entrenar"; close; } OnInit: set .Level,15; end; }
Edité algunas partes y ordené sentencias.
Hola, como pusiste los Tab? #Offtopic
Si, ahí funcionó. Yo la verdad soy nuevo en esto de los script, he estado aprendiendo mirando ejemplos y cosas. Pero aún sigo tan noob que te hare una pregunta , para que sirven esos Oninit o ON cosas?
saludos
-
I want make a room with one mvp. When people kill mvp the barricade dissapear, because i want make a warp behind barricades. If that is not possible, put the barricade as wall behind mvp:
players fighting with Mvp------ wall------warp ( it can teleport you to other map)
Sorry for my english.
-
prontera,154,173,5 script Capitán 657,{ OnInit: set .@Level, 15; end; mes "Ando en busca de aventureros para"; mes "adentrarse en el dungeon de La Ciudad"; mes "de los Inicios"; next; mes "Necesitas ser sobre nivel 15"; if (BaseLevel => 15) { getitem 12622,1; } else { mes "Lo siento te faltan "+.@Level - BaseLevel+" niveles"; mes "ve a entrenar"; } close; }
Cada vez que hablen con el NPC les dara el item, no se si eso quieras.
de que manera se podria hacer que lo diera una vez y luego nunca más?
prontera,154,173,5 script Capitán 657,{ OnInit: set .@Level, 15; end; mes "Ando en busca de aventureros para"; mes "adentrarse en el dungeon de La Ciudad"; mes "de los Inicios"; next; mes "Necesitas ser sobre nivel 15"; if (BaseLevel => 15) { if(itemEntregado != 1){ getitem 12622,1; set itemEntregado,1; }else{ mes "Ya te hemos dado el item"; } } else { mes "Lo siento te faltan "+.@Level - BaseLevel+" niveles"; mes "ve a entrenar"; } close; }
Variables permanentes de player, no lo probe pero deberia de funcionar, cuando lo pruebes haz un segundo reloadscript para checar que la variable permanece. Suerte Edit para que salga un dialogo de entregado, cambia los espacios de indentacion por Tabuladores
Por alguna razón no me carga
-
prontera,154,173,5 script Capitán 657,{ OnInit: set .@Level, 15; end; mes "Ando en busca de aventureros para"; mes "adentrarse en el dungeon de La Ciudad"; mes "de los Inicios"; next; mes "Necesitas ser sobre nivel 15"; if (BaseLevel => 15) { getitem 12622,1; } else { mes "Lo siento te faltan "+.@Level - BaseLevel+" niveles"; mes "ve a entrenar"; } close; }
Cada vez que hablen con el NPC les dara el item, no se si eso quieras.
de que manera se podria hacer que lo diera una vez y luego nunca más?
Instance disable/enable npc
in Scripting Support
Posted · Edited by angelwarrior
Hi guys,
I can't enable an instance npc with those scripts. My idea is when you kill a mvp(1296) the warp become enabled and you can pass to next level. But when i kills him the warp not appear. I use 2 scripts:
To create instance:
to warp appear when i kill mvp (npc is in map):
Thanks for help me!