Jump to content
  • 0

Script OnLogInEvent


Question

Posted

I woul like to request a script that triggers an effect when a job logs on the server, the effect will be that that job will have a new skill, like when equiped with a smokie card, and when the job logs out then the skills vanish.

I would like to make this for 3 jobs, thanks in adnvanced!

11 answers to this question

Recommended Posts

Posted (edited)

huh no one? just asking, if not i will stop multi post ):

 

maybe the script can go like this?

 

function	script	bonus_parametr1	{
   OnPCLoginEvent:
if(BaseJob==Job_X) {
		skill "TF_HIDING",1;
		end;
	}
else if(BaseJob==Job_Y) {
skill "MG_SIGHT",1;
end;
}
else if(BaseJob==Job_Z) {
skill "AL_HEAL",1;
end;
}
}

¿? help there please

Edited by Kido
Posted

Change : 

if(BaseJob==Job_X)

to : 

if ( BaseClass == Job_X )

where X are any of the following :

Job_Novice        0
Job_Swordman        1
Job_Mage        2
Job_Archer        3
Job_Acolyte        4
Job_Merchant        5
Job_Thief        6
Job_Knight        7
Job_Priest        8
Job_Wizard        9
Job_Blacksmith        10
Job_Hunter        11
Job_Assassin        12
Job_Knight2        13
Job_Crusader        14
Job_Monk        15
Job_Sage        16
Job_Rogue        17
Job_Alchem        18
Job_Alchemist        18
Job_Bard        19
Job_Dancer        20
Job_Crusader2        21
Job_Wedding        22
Job_SuperNovice        23
Job_Gunslinger        24
Job_Ninja        25
Job_Xmas        26
Job_Summer        27
Job_Hanbok        26
Job_Novice_High        4001
Job_Swordman_High        4002
Job_Mage_High        4003
Job_Archer_High        4004
Job_Acolyte_High        4005
Job_Merchant_High        4006
Job_Thief_High        4007
Job_Lord_Knight        4008
Job_High_Priest        4009
Job_High_Wizard        4010
Job_Whitesmith        4011
Job_Sniper        4012
Job_Assassin_Cross        4013
Job_Lord_Knight2        4014
Job_Paladin        4015
Job_Champion        4016
Job_Professor        4017
Job_Stalker        4018
Job_Creator        4019
Job_Clown        4020
Job_Gypsy        4021
Job_Paladin2        4022
Job_Baby        4023
Job_Baby_Swordman        4024
Job_Baby_Mage        4025
Job_Baby_Archer        4026
Job_Baby_Acolyte        4027
Job_Baby_Merchant        4028
Job_Baby_Thief        4029
Job_Baby_Knight        4030
Job_Baby_Priest        4031
Job_Baby_Wizard        4032
Job_Baby_Blacksmith        4033
Job_Baby_Hunter        4034
Job_Baby_Assassin        4035
Job_Baby_Knight2        4036
Job_Baby_Crusader        4037
Job_Baby_Monk        4038
Job_Baby_Sage        4039
Job_Baby_Rogue        4040
Job_Baby_Alchem        4041
Job_Baby_Alchemist        4041
Job_Baby_Bard        4042
Job_Baby_Dancer        4043
Job_Baby_Crusader2        4044
Job_Super_Baby        4045
Job_Taekwon        4046
Job_Star_Gladiator        4047
Job_Star_Gladiator2        4048
Job_Soul_Linker        4049
Job_Gangsi        4050
Job_Death_Knight        4051
Job_Dark_Collector        4052
Job_Rune_Knight        4054
Job_Warlock        4055
Job_Ranger        4056
Job_Arch_Bishop        4057
Job_Mechanic        4058
Job_Guillotine_Cross        4059
Job_Rune_Knight_T        4060
Job_Warlock_T        4061
Job_Ranger_T        4062
Job_Arch_Bishop_T        4063
Job_Mechanic_T        4064
Job_Guillotine_Cross_T        4065
Job_Royal_Guard        4066
Job_Sorcerer        4067
Job_Minstrel        4068
Job_Wanderer        4069
Job_Sura        4070
Job_Genetic        4071
Job_Shadow_Chaser        4072
Job_Royal_Guard_T        4073
Job_Sorcerer_T        4074
Job_Minstrel_T        4075
Job_Wanderer_T        4076
Job_Sura_T        4077
Job_Genetic_T        4078
Job_Shadow_Chaser_T        4079
Job_Rune_Knight2        4080
Job_Rune_Knight_T2        4081
Job_Royal_Guard2        4082
Job_Royal_Guard_T2        4083
Job_Ranger2        4084
Job_Ranger_T2        4085
Job_Mechanic2        4086
Job_Mechanic_T2        4087
Job_Baby_Rune        4096
Job_Baby_Warlock        4097
Job_Baby_Ranger        4098
Job_Baby_Bishop        4099
Job_Baby_Mechanic        4100
Job_Baby_Cross        4101
Job_Baby_Guard        4102
Job_Baby_Sorcerer        4103
Job_Baby_Minstrel        4104
Job_Baby_Wanderer        4105
Job_Baby_Sura        4106
Job_Baby_Genetic        4107
Job_Baby_Chaser        4108
Job_Baby_Rune2        4109
Job_Baby_Guard2        4110
Job_Baby_Ranger2        4111
Job_Baby_Mechanic2        4112
Job_Super_Novice_E        4190
Job_Super_Baby_E        4191
Job_Kagerou        4211
Job_Oboro        4212
Job_Rebellion 4215
Posted

aw thanks for the repply :3

so the script would go like this?

 

function    script    loginjob    {
OnPCLoginEvent:
if ( BaseClass == Job_X ) { skill "TF_HIDING"",1; }
end:
}
else
if ( BaseClass == Job_Y ) { skill "AL_HEAL",1; }
end;
}
else
if ( BaseClass == Job_Z ) { skill "MG_SIGHT",1; }
end;
}
}

o:!

Posted

You will receive syntax error on your code. The proper way to do it is : 

function    script    loginjob    {
OnPCLoginEvent:
    if ( BaseClass == Job_X ) { skill "TF_HIDING",1; }
    else if ( BaseClass == Job_Y ) { skill "AL_HEAL",1; }
    else { skill "MG_SIGHT",1; }
    end;
}

This means that when Job_X log in he will receive skill hiding while Job_Y will receive heal. Any other job that is not Job_X and Job_Y will receive sight skill

Posted

You will receive syntax error on your code. The proper way to do it is : 

function    script    loginjob    {
OnPCLoginEvent:
    if ( BaseClass == Job_X ) { skill "TF_HIDING",1; }
    else if ( BaseClass == Job_Y ) { skill "AL_HEAL",1; }
    else { skill "MG_SIGHT",1; }
    end;
}

This means that when Job_X log in he will receive skill hiding while Job_Y will receive heal. Any other job that is not Job_X and Job_Y will receive sight skill

 

sorry to bother again, but it did not work sir ):

Posted

Well your script is a function. If you will not use callfunc then it will not work. If you want it to work once a player login. Use this :

-    script    loginjob    -1,{
OnPCLoginEvent:
    if ( BaseClass == Job_X ) { skill "TF_HIDING",1; }
    else if ( BaseClass == Job_Y ) { skill "AL_HEAL",1; }
    else { skill "MG_SIGHT",1; }
    end;
}
Posted

Well your script is a function. If you will not use callfunc then it will not work. If you want it to work once a player login. Use this :

-    script    loginjob    -1,{
OnPCLoginEvent:
    if ( BaseClass == Job_X ) { skill "TF_HIDING",1; }
    else if ( BaseClass == Job_Y ) { skill "AL_HEAL",1; }
    else { skill "MG_SIGHT",1; }
    end;
}

 

ow nope it is still not working, do i have to reboot my server sir?

Posted

@loadnpc <npc path> command is sufficient. Post error if any? 

 

already did it and im not getting any error but the jobs does not get the skill ):

Join the conversation

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

Guest
Answer this question...

×   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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...