|
||
|
|||||||
| Script Support Get support for modifying RunUO Scripts, or writing your own! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Expert
Join Date: Dec 2006
Posts: 455
|
Hey everyone how you all!! O_0
uhm, im just working on a small gump, that has 7 buttons, and each one gives a different crafting tool. The script is as follows: Code:
using Server;
using System;
using Server.Gumps;
using Server.Commands;
using Server.Network;
namespace Server.Gumps
{
public class ToolGump : Gump
{
public ToolGump()
: base(347, 216)
{
this.Closable = true;
this.Disposable = false;
this.Dragable = true;
this.Resizable = false;
this.AddPage(0);
this.AddBackground(0, 0, 298, 390, 2600);
this.AddLabel(88, 10, 1171, @"Crafting Tools");
this.AddLabel(89, 63, 1159, @"Smith Hammer");
this.AddLabel(89, 108, 1159, @"Fletching Tools");
this.AddLabel(89, 152, 1159, @"Saw");
this.AddLabel(89, 198, 1159, @"Hatchet");
this.AddLabel(89, 243, 1159, @"Pickaxe");
this.AddLabel(89, 288, 1159, @"Sewing Kit");
this.AddLabel(89, 334, 1159, @"Tinkers Tools");
this.AddButton(208, 63, 247, 248, 1, GumpButtonType.Reply, 0);
this.AddButton(208, 108, 247, 248, 2, GumpButtonType.Reply, 0);
this.AddButton(208, 152, 247, 248, 3, GumpButtonType.Reply, 0);
this.AddButton(208, 198, 247, 248, 4, GumpButtonType.Reply, 0);
this.AddButton(208, 243, 247, 248, 5, GumpButtonType.Reply, 0);
this.AddButton(208, 288, 247, 248, 6, GumpButtonType.Reply, 0);
this.AddButton(208, 334, 247, 248, 7, GumpButtonType.Reply, 0);
this.AddItem(13, 63, 5091, 0);
this.AddItem(7, 108, 4130, 0);
this.AddItem(3, 152, 4148, 0);
this.AddItem(19, 198, 3907, 0);
this.AddItem(9, 243, 3718, 0);
this.AddItem(0, 288, 3997, 0);
this.AddItem(9, 334, 7864, 0);
}
public override void OnResponse(NetState sender, RelayInfo info)
{
Mobile m = sender.Mobile;
switch (info.ButtonID)
{
case 0:
{
m.SendMessage( 68, "You choose not to create any tools.");
return;
}
case 1:
{
m.SendMessage("You have created a smith hammer");
m.Backpack.DropItem( new ( SmithHammer ));
}
case 2:
{
}
case 3:
{
}
case 4:
{
}
case 5:
{
}
case 6:
{
}
case 7:
{
}
}
}
}
}
error line 64: expected PHP Code:
thanks for the help regards
__________________
legendsofkaine.page.tl
|
|
|
|
|
|
#3 (permalink) |
|
Forum Expert
Join Date: Dec 2006
Posts: 455
|
oh dont joke O_0
if that is the problem I am going to be so pissed, I spent hours trying all different things, thinking "there cannot be anything wrong with what ive got here" meanwhile I had a return there, I just pasted over it when I copied different selections of code into that area ill try that now and get back to ya ta
__________________
legendsofkaine.page.tl
|
|
|
|
|
|
#5 (permalink) |
|
Forum Expert
Join Date: Dec 2006
Posts: 455
|
Haha, as I put those exact things into the coding, I refreshed this page while I was waiting for it to compile...*waits some more*.......ERRORS!!
![]() ok, now it tunes me some other error: Line 64: type or namespace 'SmithHammer' could not be found <are you using missing directive or assembly ref> Line 64: The best overload method match for 'server.items.container.Dropitem<server.item> has some invalid arguments Line 64: argument '1': cannot convert from 'SmithHammer' to 'server.item' any suggestions ? thanks again for your help thus far
__________________
legendsofkaine.page.tl
|
|
|
|
![]() |
| Bookmarks |
| Tags |
| gump, issues |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|