Jayz Posted August 31, 2020 Group: Members Topic Count: 59 Topics Per Day: 0.01 Content Count: 407 Reputation: 55 Joined: 07/24/12 Last Seen: October 22, 2024 Share Posted August 31, 2020 Can the "killedrid" be used instead of the mob id to be job id? or want another way or idea Quote Link to comment Share on other sites More sharing options...
0 sader1992 Posted August 31, 2020 Group: Content Moderator Topic Count: 55 Topics Per Day: 0.01 Content Count: 1691 Reputation: 716 Joined: 12/21/14 Last Seen: Yesterday at 01:31 PM Share Posted August 31, 2020 what do you mean by job id ? you want the job id of the player who is killed ? you can do readparam() OnPCKillEvent: debugmes "" + readparam(Class,convertpcinfo(killedrid,CPC_CHAR)); end; readparam(Class,convertpcinfo(killedrid,CPC_CHAR)) will return the class of the killed if it's a player ofc , hint OnPCKillEvent 1 1 Quote Link to comment Share on other sites More sharing options...
0 Jayz Posted August 31, 2020 Group: Members Topic Count: 59 Topics Per Day: 0.01 Content Count: 407 Reputation: 55 Joined: 07/24/12 Last Seen: October 22, 2024 Author Share Posted August 31, 2020 16 minutes ago, sader1992 said: what do you mean by job id ? you want the job id of the player who is killed ? you can do readparam() OnPCKillEvent: debugmes "" + readparam(Class,convertpcinfo(killedrid,CPC_CHAR)); end; readparam(Class,convertpcinfo(killedrid,CPC_CHAR)) will return the class of the killed if it's a player ofc , hint OnPCKillEvent Great thank you btw it possible certain class job? Quote Link to comment Share on other sites More sharing options...
0 sader1992 Posted August 31, 2020 Group: Content Moderator Topic Count: 55 Topics Per Day: 0.01 Content Count: 1691 Reputation: 716 Joined: 12/21/14 Last Seen: Yesterday at 01:31 PM Share Posted August 31, 2020 2 hours ago, Zack- said: Great thank you btw it possible certain class job? I didn't understand The player's class is his job id Quote Link to comment Share on other sites More sharing options...
0 Jayz Posted August 31, 2020 Group: Members Topic Count: 59 Topics Per Day: 0.01 Content Count: 407 Reputation: 55 Joined: 07/24/12 Last Seen: October 22, 2024 Author Share Posted August 31, 2020 (edited) 1 hour ago, sader1992 said: I didn't understand The player's class is his job id Sorry if you did not understand what I said, I want to make a pvp event challenge and the challenge will kill specific jobs like kill 5 assassin cross or kill 1 sniper / high wizard etc. I want to know how he can kill count every job Edited August 31, 2020 by Zack- Quote Link to comment Share on other sites More sharing options...
0 Patskie Posted August 31, 2020 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 7 hours ago Share Posted August 31, 2020 You have to add up something like this OnPCKillEvent: .@self = getcharid(3); if (killedrid == .@self) end; attachrid killedrid; .@class = Class; attachrid .@self; .@index = inarray(class_arr, .@class); if (.@index == -1) { .@size = getarraysize(class_arr); class_arr[.@size] = .@class; count_arr[.@size] = 1; } else cleararray count_arr[.@index], count_arr[.@index] + 1, 1; end; and then you can create npc to fetch all the details like below .@size = getarraysize(class_arr); if (!.@size) mes "No data"; else { mes "Your kills per class"; for (.@i = 0; .@i < .@size; .@i++) mes "> Job:" + jobname(class_arr[.@i]) + " | Kill Count:" + count_arr[.@i]; } close; 1 Quote Link to comment Share on other sites More sharing options...
0 Jayz Posted August 31, 2020 Group: Members Topic Count: 59 Topics Per Day: 0.01 Content Count: 407 Reputation: 55 Joined: 07/24/12 Last Seen: October 22, 2024 Author Share Posted August 31, 2020 11 hours ago, Patskie said: You have to add up something like this OnPCKillEvent: .@self = getcharid(3); if (killedrid == .@self) end; attachrid killedrid; .@class = Class; attachrid .@self; .@index = inarray(class_arr, .@class); if (.@index == -1) { .@size = getarraysize(class_arr); class_arr[.@size] = .@class; count_arr[.@size] = 1; } else cleararray count_arr[.@index], count_arr[.@index] + 1, 1; end; and then you can create npc to fetch all the details like below .@size = getarraysize(class_arr); if (!.@size) mes "No data"; else { mes "Your kills per class"; for (.@i = 0; .@i < .@size; .@i++) mes "> Job:" + jobname(class_arr[.@i]) + " | Kill Count:" + count_arr[.@i]; } close; I see. im gonna try thank you Quote Link to comment Share on other sites More sharing options...
0 Jayz Posted September 2, 2020 Group: Members Topic Count: 59 Topics Per Day: 0.01 Content Count: 407 Reputation: 55 Joined: 07/24/12 Last Seen: October 22, 2024 Author Share Posted September 2, 2020 On 8/31/2020 at 6:55 PM, Patskie said: You have to add up something like this OnPCKillEvent: .@self = getcharid(3); if (killedrid == .@self) end; attachrid killedrid; .@class = Class; attachrid .@self; .@index = inarray(class_arr, .@class); if (.@index == -1) { .@size = getarraysize(class_arr); class_arr[.@size] = .@class; count_arr[.@size] = 1; } else cleararray count_arr[.@index], count_arr[.@index] + 1, 1; end; and then you can create npc to fetch all the details like below .@size = getarraysize(class_arr); if (!.@size) mes "No data"; else { mes "Your kills per class"; for (.@i = 0; .@i < .@size; .@i++) mes "> Job:" + jobname(class_arr[.@i]) + " | Kill Count:" + count_arr[.@i]; } close; Its working, btw can you give me an idea how can i make it similar here OnNPCKillEvent: if( killedrid == 1002 ){ set #PoringKill,#PoringKill + 1; end; Quote Link to comment Share on other sites More sharing options...
0 Patskie Posted September 2, 2020 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 7 hours ago Share Posted September 2, 2020 OnNPCKillEvent is for monster. Quote Link to comment Share on other sites More sharing options...
0 Jayz Posted September 2, 2020 Group: Members Topic Count: 59 Topics Per Day: 0.01 Content Count: 407 Reputation: 55 Joined: 07/24/12 Last Seen: October 22, 2024 Author Share Posted September 2, 2020 1 hour ago, Patskie said: OnNPCKillEvent is for monster. Yah thanks for correction, everything is working fine and im using it now, i try to edit your code 4 hours ago, Zack- said: OnNPCKillEvent: if( killedrid == 1002 ){ set #PoringKill,#PoringKill + 1; end; i want to make similar this i tried to modified your code and change the Class to JobID 4010 and class_arr[.@size] = .@class; to class_arr[.@size] = .@class, set #HWPoints,#HWPoints +1; but not working - script test123 -1,{ OnPCKillEvent: .@self = getcharid(3); if (killedrid == .@self) end; attachrid killedrid; .@class = 4010; attachrid .@self; .@index = inarray(class_arr, .@class); if (.@index == -1) { .@size = getarraysize(class_arr); class_arr[.@size] = .@class, set #HWPoints,#HWPoints + 1; count_arr[.@size] = 1; } else cleararray count_arr[.@index], count_arr[.@index] + 1, 1; end; } Quote Link to comment Share on other sites More sharing options...
Question
Jayz
Can the "killedrid" be used instead of the mob id to be job id? or want another way or idea
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.