Jump to content

OnInit Trigger


tr0n

Recommended Posts


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

You don't want to wait because of @reloadscript only for reloading OnInit ?,

you used @loadnpc and OnInit doesn't get triggered ?,

You don't want to respawn your mvps with @reloadscript because you're player will kill them again ?

and you players don't like delay cause of @reloadscript ?

With this command it's possible to trigger OnInit for you without all of these problems.

Just patch your source with my diff file.

If you insert a script with @loadnpc just load the OnInit label with @oninit :P

Syntax:

@oninit <npcname>

oninit.diff

Edited by tr0n
  • Upvote 7
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  222
  • Reputation:   35
  • Joined:  12/13/11
  • Last Seen:  

nice :P, i +1 this.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  268
  • Reputation:   27
  • Joined:  12/06/11
  • Last Seen:  

Thanks! :D

The command works perfectly! :P

Edited by Kaito_Kid
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  633
  • Reputation:   78
  • Joined:  11/14/11
  • Last Seen:  

nice one. Tron is the man! :P

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

erm..not sure will you accpet this suggestion of mine...

make it able to select to trigger all npc OnInit or 1 NPC...

because..if just based on 1 NPC..there is alternate way to trigger it...

for example :

OnWhisperGlobal:
OnInit:
<script>
end;

using a OnWhisperGlobal is possible to trigger the OnInit Label as well since it is only for 1 NPC.

and i am sure you are only using this to load a NPC with OnInit label without restart server

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

@Emistry

for this the command @trigger already exists in Source releases.

Mine is for:

If you @loadnpc something on your server you don't want to reloadscript

cause the player don't like it and the mvps respawn. With my command

you can bypass it with using @oninit npcname to trigger the oninit label.

Edited by tr0n
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Owh...haha i didnt know about that...

maybe it is because of the rAFileBot spammed the forum last time...

i just skipped all the Bot's Topic..>.<

because too many topic the bot have created...

haha thx for point it to me

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  386
  • Reputation:   15
  • Joined:  11/17/11
  • Last Seen:  

+1 tr0n

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  70
  • Topics Per Day:  0.02
  • Content Count:  1245
  • Reputation:   392
  • Joined:  11/19/11
  • Last Seen:  

Nice job Tr0n. This will save quite a lot of time doing NPC loads/updates. :D

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

Syntax:

@oninit <npcname>

Do this code will trigger the whole NPC on the script? I mean for duplicated NPC's..

Edited by uDe
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  268
  • Reputation:   27
  • Joined:  12/06/11
  • Last Seen:  

Syntax:

@oninit <npcname>

Do this code will trigger the whole NPC on the script? I mean for duplicated NPC's..

If it is a duplicate NPC then yes :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

If it is a duplicate NPC then yes :)

The command is @oninit <npcname>. So, I just have to trigger the main npc name right?

It confuse me because of <npcname>. Not <npcfilename>.. Sorry, it's just Newb questions..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  268
  • Reputation:   27
  • Joined:  12/06/11
  • Last Seen:  

The command is @oninit <npcname>. So, I just have to trigger the main npc name right?

It confuse me because of <npcname>. Not <npcfilename>.. Sorry, it's just Newb questions..

Yes :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

Thank you so much!

Great release anyway.. :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

Thank you so much!

Great release anyway.. :)

thank you ;)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  145
  • Reputation:   15
  • Joined:  01/06/12
  • Last Seen:  

why you not mix up on rathena trunk version?

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

Not necessary anymore since @loadnpc triggers the oninit label.

But still usable for eAthena.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  341
  • Reputation:   43
  • Joined:  01/10/12
  • Last Seen:  

Great work! /no1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  154
  • Reputation:   1
  • Joined:  05/02/12
  • Last Seen:  

cool

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  251
  • Reputation:   20
  • Joined:  12/22/11
  • Last Seen:  

wow amazing .. it's very usefull :D +1

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  198
  • Reputation:   47
  • Joined:  08/01/12
  • Last Seen:  

nice job man!

btw, how about if i want to cancel the oninit triggered? how to do that?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

revert the changes then.....

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  198
  • Reputation:   47
  • Joined:  08/01/12
  • Last Seen:  

what should i use?

i tried @unloadnpc "script's npc name" then the npc was disabled, but not the triggered script.

e.g.

cell_walkable,0 is still on.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

revert this changeset.. if you dont want @loadnpc to load OnInit

http://trac.rathena.org/changeset/16130/rathena

@unloadnpc wont help you unload the whole npc folder...

it only unload the npc that you specified.

the mapfalg / setcell ..all you have to create another script to unload it or dont load it during next reboot

Link to comment
Share on other sites

  • 4 months later...

  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

can i use this diff in 3ecam ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...