Dbscroll Packing Command

01/09/2016 02:25 arneljan#1
Can Some One Tell Me How To Make Command To Pack 10 DB or Meteor To DBScroll Or MetoerScroll

Can Some One Give Me Sample Of Command..
01/09/2016 05:09 Asphy×ia#2
Wherever you've coded your item usages:

case xxxx:
{
if (player.inventory.contains(dbID, 10)
{
removeItem(DbId, 10);
addItem(DbscrollId, 1);
}
else
Text("You don't have enough to create a DBscroll.");

You don't have to use the else, but that is a simple version of doing it - not specifying which source you are using, it's plainly simple

same for met scroll.
01/09/2016 07:47 arneljan#3
Ty For sharing this.. i use source 5530

Is This The Right Command To Pack

case "DBScroll":
{
if (client.Inventory.Contains(1088000, 10))
{
client.Inventory.Add(720027, 0, 1);//DBScroll
}
if (client.Inventory.Contains(1088000, 10))
{
client.Inventory.Remove(1088000, 10);
}
break;
}
case "MetScroll":
{
if (client.Inventory.Contains(1088001, 10))
{
client.Inventory.Add(720027, 0, 1);//Meteor Scroll
}
if (client.Inventory.Contains(1088001, 10))
{
client.Inventory.Remove(1088001, 10);
}
break;
}
01/09/2016 10:07 Asphy×ia#4
Quote:
Originally Posted by arneljan View Post
Ty For sharing this.. i use source 5530

Is This The Right Command To Pack

case "DBScroll":
{
if (client.Inventory.Contains(1088000, 10))
{
client.Inventory.Add(720027, 0, 1);//DBScroll
}
if (client.Inventory.Contains(1088000, 10))
{
client.Inventory.Remove(1088000, 10);
}
break;
}
case "MetScroll":
{
if (client.Inventory.Contains(1088001, 10))
{
client.Inventory.Add(720027, 0, 1);//Meteor Scroll
}
if (client.Inventory.Contains(1088001, 10))
{
client.Inventory.Remove(1088001, 10);
}
break;
}
Sure but you're accumulating useless checks.

case "DBScroll":
{
if (client.Inventory.Contains(1088000, 10))
{
client.Inventory.Remove(1088000, 10);
client.Inventory.Add(720027, 0, 1);//DBScroll
}
break;
}

You were checking if the inventory contained 10 dbs twice, which isn't needed. Just throw the main check, if it's good: remove the 10 dbs and replace with a DBScroll. Same for mets.
01/09/2016 10:14 Spirited#5
Wait, don't tell me that shit actually switches based on string comparisons. That can't be real source code. I feel ill.
01/09/2016 10:16 arneljan#6
Ty Its Working Now Thanks For The Help
01/09/2016 10:30 Spirited#7
NO. That was actual source code?! WHYY?? At best it's hashing strings, at worst it's a sequence of string compares! Why are you doing this?! Please don't do that.
01/09/2016 16:53 pro4never#8
Quote:
Originally Posted by Spirited View Post
NO. That was actual source code?! WHYY?? At best it's hashing strings, at worst it's a sequence of string compares! Why are you doing this?! Please don't do that.
Halloween came early this year :(
01/14/2016 10:31 InsomniacPro#9
Quote:
Originally Posted by Spirited View Post
Wait, don't tell me that shit actually switches based on string comparisons. That can't be real source code. I feel ill.
I already have a headache.
01/17/2016 10:08 Soulfly25#10
Suggestion. Why u make a command for the Dbscroll?. why not make it directly right click the meteor in the inventory and wallah the 10meteor has become 1 meteorscroll!

Bravo!
01/19/2016 09:30 Asphy×ia#11
Quote:
Originally Posted by Soulfly25 View Post
Suggestion. Why u make a command for the Dbscroll?. why not make it directly right click the meteor in the inventory and wallah the 10meteor has become 1 meteorscroll!

Bravo!
He's not making a command, he's trying to do what you just stated