Beispiel #1
0
// Wall posts a message to a group wall. The account the client is logged into
// must have a group role that has permission to post to the group's wall.
//
// This function requires the client to be logged in.
func Wall(client *rbxweb.Client, groupID int32, message string) (success bool) {
	page := client.GetURL(`www`, `/My/Groups.aspx`, url.Values{"gid": {client.I32toa(groupID)}})
	err := client.DoRawPost(page, url.Values{
		"ctl00$ctl00$cphRoblox$cphMyRobloxContent$GroupWallPane$NewPost":                       {message},
		"ctl00$ctl00$cphRoblox$cphMyRobloxContent$GroupWallPane$NewPostButton":                 {},
		"ctl00$ctl00$cphRoblox$cphMyRobloxContent$rbxGroupRoleSetMembersPane$currentRoleSetID": {},
	})
	if err != nil {
		return false
	}
	return true
}
Beispiel #2
0
func TradeRobux(client *rbxweb.Client, robux int64, tickets int64, limit bool, split bool) (err error) {
	page := client.GetURL(`www`, `/My/Money.aspx`, nil)
	query := url.Values{
		"__EVENTTARGET":                                                           {"ctl00$ctl00$cphRoblox$cphMyRobloxContent$ctl00$SubmitTradeButton"},
		"__VIEWSTATE":                                                             {},
		"__EVENTVALIDATION":                                                       {},
		"ctl00$ctl00$cphRoblox$cphMyRobloxContent$ctl00$HaveCurrencyDropDownList": {"Robux"},
		"ctl00$ctl00$cphRoblox$cphMyRobloxContent$ctl00$HaveAmountTextBoxRestyle": {strconv.Itoa(robux)},
		"ctl00$ctl00$cphRoblox$cphMyRobloxContent$ctl00$WantCurrencyDropDownList": {"Tickets"},
		"ctl00$ctl00$cphRoblox$cphMyRobloxContent$ctl00$WantAmountTextBox":        {strconv.Itoa(tickets)},
	}
	if limit {
		query.Set("ctl00$ctl00$cphRoblox$cphMyRobloxContent$ctl00$OrderType", "LimitOrderRadioButton")
	} else {
		query.Set("ctl00$ctl00$cphRoblox$cphMyRobloxContent$ctl00$OrderType", "MarketOrderRadioButton")
	}
	if split {
		query.Set("ctl00$ctl00$cphRoblox$cphMyRobloxContent$ctl00$AllowSplitTradesCheckBox", "on")
	} else {
		query.Set("ctl00$ctl00$cphRoblox$cphMyRobloxContent$ctl00$AllowSplitTradesCheckBox", "off")
	}
	err = client.DoRawPost(page, query)
	return
}