Jump to content
  • 0

Weapon stats request


vijay30393

Question


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   0
  • Joined:  05/10/12
  • Last Seen:  

25620,Royal_Scythe,Royal_Scythe,4,1,5000000,5,1,1, 1,4,0x00000100,6,2,2,4,100,1,8,{bonus bStr,10+(@kill*7);bonus bAllStats,1+(@kill);bonus2 bIgnoreDefRate,RC_DemiHuman,20+@kill;},{dispbottom "[Royal Weapon] Your power is strong. Power:"+@kill;misceffect 182;misceffect 190;specialeffect2 543;},{}
 

weapons will have a progressive script.
Each Player kill will boost your weapon damage and stats.
If you die, you lose half of the stacked kills and power.
The weapon can stacked up to 10 kills for Max Power.
Stats should be-
 
Dex/Str/Int = 30+(kills*5)
allstats = 1+(kills)
demihuman damage = 3+kill
 
At max power:
30+(10*5) = 80 dex or str or int
allstats 1+10 = 11
Demihuman Damage 20+10 = 30
 
There are 14 different weapons, i just added 1 above.
But its not working like the script says.
Could you guys help me fix it?
Thanks~
Link to comment
Share on other sites

14 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  392
  • Reputation:   47
  • Joined:  11/18/11
  • Last Seen:  

if(isequipped) and you should also put if(isequipped) everytime you're making a comparison.

 

- script RoyalWeapon -1,{
 
OnPCKillEvent:
if(isequipped(25621) || 
isequipped(25622) || 
isequipped(25623) || 
isequipped(25624) || 
isequipped(25625) || 
isequipped(25626) || 
isequipped(25627) || 
isequipped(25628) || 
isequipped(25629) || 
isequipped(25630) || 
isequipped(25631) || 
isequipped(25632) || 
isequipped(25633)) {
if ( @kill < 10 ) { 
set @kill,@kill + 1; 
message strcharinfo(0),"You got "+@kill+" Kills";
}
}
end;
 
OnPCDieEvent:
if(isequipped(25621) || 
isequipped(25622) || 
isequipped(25623) || 
isequipped(25624) || 
isequipped(25625) || 
isequipped(25626) || 
isequipped(25627) || 
isequipped(25628) || 
isequipped(25629) || 
isequipped(25630) || 
isequipped(25631) || 
isequipped(25632) || 
isequipped(25633)) {
if ( @kill > 0 ) {
set @kill, @kill/2; 
message strcharinfo(0),"You got "+@kill+" Kills";
}
}
end;
}
Link to comment
Share on other sites


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

that's because you didnt have any npc script that will update the @kill variable.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   0
  • Joined:  05/10/12
  • Last Seen:  

Can you help me with that emistry?

Link to comment
Share on other sites


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


OnPCKillEvent:

if ( @kill < 10 )

@kill++;

end;

OnPCDieEvent:

if ( @kill > 0 ) {

@kill--;

}

end;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   0
  • Joined:  05/10/12
  • Last Seen:  


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


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   0
  • Joined:  05/10/12
  • Last Seen:  

Script has been fixed but
Still the stats is not changing in game @emistry!
 
- script RoyalWeapon -1,{
OnPCKillEvent:
if ( @kill < 10 ){
set .@kill,.@kill + 1;
}
    end;

OnPCDieEvent:
    if ( @kill > 0 ) {
set .@kill,.@kill - 1;
}
end;
}

 

Dump anyone!

Dump~ Need help!

Edited by Emistry
Link to comment
Share on other sites


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

you are using wrong type of variable .... your variable doesnt persist after script executed.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   0
  • Joined:  05/10/12
  • Last Seen:  

Fixed it!


- script RoyalWeapon -1,{
end;

OnPCKillEvent:
if ( @kill < 10 ) { 
set @kill,@kill + 1; 
message strcharinfo(0),"You got "+@kill+" Kills";
}
end;

OnPCDieEvent:
if ( @kill > 0 ) {
set @kill,@kill - 5; 
message strcharinfo(0),"You got "+@kill+" Kills";
}
end;

}
Edited by Emistry
codebox
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   0
  • Joined:  05/10/12
  • Last Seen:  

Still little problem.

- script RoyalWeapon -1,{

OnPCKillEvent:
if(isequipped(25620) && if(isequipped(25621) && if(isequipped(25622) && if(isequipped(25623) && if(isequipped(25624) && if(isequipped(25625) && if(isequipped(25626) && if(isequipped(25627) && if(isequipped(25628) && if(isequipped(25629) && if(isequipped(25630) && if(isequipped(25631) && if(isequipped(25632) && if(isequipped(25633)) {
if ( @kill < 10 ) { 
set @kill,@kill + 1; 
message strcharinfo(0),"You got "+@kill+" Kills";
}
end;
}

OnPCDieEvent:
if(isequipped(25620) && if(isequipped(25621) && if(isequipped(25622) && if(isequipped(25623) && if(isequipped(25624) && if(isequipped(25625) && if(isequipped(25626) && if(isequipped(25627) && if(isequipped(25628) && if(isequipped(25629) && if(isequipped(25630) && if(isequipped(25631) && if(isequipped(25632) && if(isequipped(25633)) {
if ( @kill > 0 ) {
set @kill, @kill/2; 
message strcharinfo(0),"You got "+@kill+" Kills";
}
end;
}
}

Isequipped is not working.
if anyone of those items are equipped, the script must pass to @set if not end;
How can i fix it? any help is appreciated :)
Edited by Emistry
codebox.
Link to comment
Share on other sites


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

replace && with ||  instead.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   0
  • Joined:  05/10/12
  • Last Seen:  

I did try that but it errors.
11668021_911427045589956_466552915_n.jpg

Link to comment
Share on other sites


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


if ( A || B || C || D || E ) {

/// script.....

/// script.....

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   0
  • Joined:  05/10/12
  • Last Seen:  

It is not erroring but the scipt is not working.
 


- script RoyalWeapon -1,{

OnPCKillEvent:
if(isequipped(25621) || (25622) || (25623) || (25624) || (25625) || (25626) || (25627) || (25628) || (25629) || (25630) || (25631) || (25632) || (25633)) {
if ( @kill < 10 ) { 
set @kill,@kill + 1; 
message strcharinfo(0),"You got "+@kill+" Kills";
}
end;
}

OnPCDieEvent:
if(isequipped(25621) || (25622) || (25623) || (25624) || (25625) || (25626) || (25627) || (25628) || (25629) || (25630) || (25631) || (25632) || (25633)) {
if ( @kill > 0 ) {
set @kill, @kill/2; 
message strcharinfo(0),"You got "+@kill+" Kills";
}
}
end;
}

 

I'm getting kills even when im not using those or any other items.
I should only be getting @kill when im using any of those items.
Edited by Emistry
Please use CODEBOX.
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
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.

×
×
  • Create New...