Jump to content

Question

14 answers to this question

Recommended Posts

Posted

So, something like this then.

prontera,180,150,4	script	Skull Trader	123,{
	set .@Top_charid,000000; //Replace 000000 with the variable of the top player. Not sure how you obtain this information.
	if( countitem2(7420,1,0,0,254,0,( .@Top_charid & 65535 ),( .@Top_charid >> 16)) )
	{delitem2(7420,1,1,0,0,254,0,( .@Top_harid & 65335 ),( .@Top_charid >> 16),1); end;}
	dispbottom "You don't have the right skull.";
	end;
}

Not sure how you are obtaining the Top Player in your pvp. So I didn't code that part.

Posted

So, something like this then.

 .@Top_charid & 65535, .@Top_charid >> 16

 

I was wondering how they got that ID thanks for this. Is there anymore documentation for example on slot 0 I know produced items are 255 not 254...

Posted

getitem2 in script_commands docs give some informations.

    // Now we split the character ID number into two portions with a binary
    // shift operation. If you don't understand what this does, just copy it.
    
    set @card3, @charid & 65535;
    set @card4, @charid >> 16;

    // If you're inscribing non-equipment, @card1 must be 254.
    // Arrows are also not equipment. :)
    set @card1,254;

    // If you're inscribing equipment, @card1 must be 255.
    set @card1,255;

Posted

i got error 

prontera,180,150,4	script	Skull Trader	123,{
	set .@Top_charid,000000; //Replace 000000 with the variable of the top player. Not sure how you obtain this information.
	if( countitem2(7420,1,0,0,254,0,( .@Top_charid & 65535 ),( .@Top_charid >> 16)) )
	{delitem2(7420,1,1,0,0,254,0,( .@Top_harid & 65335 ),( .@Top_charid >> 16),1); end;}
	dispbottom "You don't have the right skull.";
	end;
}
Posted (edited)

It's a small typo. Please at least " TRY " and fix the scripts yourself. Also, just saying ' I got error ' doesn't help us in determining whats wrong with the script. Because as you'll see it was just a matter of adding a letter ' C '.

REPLACE

prontera,180,150,4	script	Skull Trader	123,{
	set .@Top_charid,000000; //Replace 000000 with the variable of the top player. Not sure how you obtain this information.
	if( countitem2(7420,1,0,0,254,0,( .@Top_charid & 65535 ),( .@Top_charid >> 16)) )
	{delitem2(7420,1,1,0,0,254,0,( .@Top_harid & 65335 ),( .@Top_charid >> 16),1); end;}
	dispbottom "You don't have the right skull.";
	end;
}

WITH

prontera,180,150,4	script	Skull Trader	123,{
	set .@Top_charid,000000; //Replace 000000 with the variable of the top player. Not sure how you obtain this information.
	if( countitem2(7420,1,0,0,254,0,( .@Top_charid & 65535 ),( .@Top_charid >> 16)) )
	{delitem2(7420,1,1,0,0,254,0,( .@Top_charid & 65335 ),( .@Top_charid >> 16),1); end;}
	dispbottom "You don't have the right skull.";
	end;
}
Edited by GmOcean

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